diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index 39a2517..7772f00 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -377,7 +377,7 @@ class ChatView extends StatelessWidget { placeholder: (_) => Container(), ) : Image.asset( - './assets/logo/background.png', + 'assets/logo/background.png', fit: BoxFit.cover, height: MediaQuery.sizeOf(context).height, width: MediaQuery.sizeOf(context).width, diff --git a/lib/pages/settings_style/settings_style_view.dart b/lib/pages/settings_style/settings_style_view.dart index 3587275..97a6062 100644 --- a/lib/pages/settings_style/settings_style_view.dart +++ b/lib/pages/settings_style/settings_style_view.dart @@ -176,24 +176,38 @@ class SettingsStyleView extends StatelessWidget { child: Stack( alignment: Alignment.center, children: [ - if (accountConfig.wallpaperUrl != null) - Opacity( - opacity: controller.wallpaperOpacity, - child: ImageFiltered( - imageFilter: ImageFilter.blur( - sigmaX: controller.wallpaperBlur, - sigmaY: controller.wallpaperBlur, - ), - child: MxcImage( - key: ValueKey(accountConfig.wallpaperUrl), - uri: accountConfig.wallpaperUrl, - fit: BoxFit.cover, - isThumbnail: true, - width: FluffyThemes.columnWidth * 2, - height: 212, - ), + Opacity( + opacity: accountConfig.wallpaperUrl != null + ? controller.wallpaperOpacity + : 0.3, + child: ImageFiltered( + imageFilter: ImageFilter.blur( + sigmaX: accountConfig.wallpaperUrl != null + ? controller.wallpaperBlur + : 0.0, + sigmaY: accountConfig.wallpaperUrl != null + ? controller.wallpaperBlur + : 0.0, ), + child: accountConfig.wallpaperUrl != null + ? MxcImage( + key: ValueKey( + accountConfig.wallpaperUrl, + ), + uri: accountConfig.wallpaperUrl, + fit: BoxFit.cover, + isThumbnail: true, + width: FluffyThemes.columnWidth * 2, + height: 212, + ) + : Image.asset( + 'assets/logo/background.png', + fit: BoxFit.cover, + width: FluffyThemes.columnWidth * 2, + height: 212, + ), ), + ), Column( mainAxisSize: .min, children: [ @@ -213,12 +227,10 @@ class SettingsStyleView extends StatelessWidget { ), ), Padding( - padding: EdgeInsets.only( + padding: const EdgeInsets.only( left: 12 + 12 + Avatar.defaultSize, right: 12, - top: accountConfig.wallpaperUrl == null - ? 0 - : 12, + top: 12, bottom: 12, ), child: DecoratedBox( @@ -246,12 +258,10 @@ class SettingsStyleView extends StatelessWidget { Align( alignment: Alignment.centerLeft, child: Padding( - padding: EdgeInsets.only( + padding: const EdgeInsets.only( right: 12, left: 12, - top: accountConfig.wallpaperUrl == null - ? 0 - : 12, + top: 12, bottom: 12, ), child: Material( diff --git a/pubspec.yaml b/pubspec.yaml index d667f11..a3e1e49 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -118,6 +118,7 @@ flutter: uses-material-design: true assets: - assets/ + - assets/logo/background.png - assets/logo/mini/ - assets/miniapps/ - assets/sounds/