fix: incluir o wallpaper padrao no bundle e mostrar na previa

O Flutter nao empacota subdirectorios de forma recursiva, e assets/logo/ nao estava listado no pubspec, portanto assets/logo/background.png nunca chegava ao bundle e o wallpaper padrao das conversas nao aparecia.

- pubspec: declara assets/logo/background.png
- chat_view: normaliza o path do asset
- settings_style_view: a previa passa a mostrar o wallpaper padrao quando nao ha imagem custom, com opacidade 0.3 e sem blur, em vez de ficar sem fundo
This commit is contained in:
2026-09-25 13:15:03 -03:00
parent 058926cf6f
commit 6f32eb8972
3 changed files with 36 additions and 25 deletions

View File

@@ -377,7 +377,7 @@ class ChatView extends StatelessWidget {
placeholder: (_) => Container(), placeholder: (_) => Container(),
) )
: Image.asset( : Image.asset(
'./assets/logo/background.png', 'assets/logo/background.png',
fit: BoxFit.cover, fit: BoxFit.cover,
height: MediaQuery.sizeOf(context).height, height: MediaQuery.sizeOf(context).height,
width: MediaQuery.sizeOf(context).width, width: MediaQuery.sizeOf(context).width,

View File

@@ -176,24 +176,38 @@ class SettingsStyleView extends StatelessWidget {
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
if (accountConfig.wallpaperUrl != null) Opacity(
Opacity( opacity: accountConfig.wallpaperUrl != null
opacity: controller.wallpaperOpacity, ? controller.wallpaperOpacity
child: ImageFiltered( : 0.3,
imageFilter: ImageFilter.blur( child: ImageFiltered(
sigmaX: controller.wallpaperBlur, imageFilter: ImageFilter.blur(
sigmaY: controller.wallpaperBlur, sigmaX: accountConfig.wallpaperUrl != null
), ? controller.wallpaperBlur
child: MxcImage( : 0.0,
key: ValueKey(accountConfig.wallpaperUrl), sigmaY: accountConfig.wallpaperUrl != null
uri: accountConfig.wallpaperUrl, ? controller.wallpaperBlur
fit: BoxFit.cover, : 0.0,
isThumbnail: true,
width: FluffyThemes.columnWidth * 2,
height: 212,
),
), ),
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( Column(
mainAxisSize: .min, mainAxisSize: .min,
children: [ children: [
@@ -213,12 +227,10 @@ class SettingsStyleView extends StatelessWidget {
), ),
), ),
Padding( Padding(
padding: EdgeInsets.only( padding: const EdgeInsets.only(
left: 12 + 12 + Avatar.defaultSize, left: 12 + 12 + Avatar.defaultSize,
right: 12, right: 12,
top: accountConfig.wallpaperUrl == null top: 12,
? 0
: 12,
bottom: 12, bottom: 12,
), ),
child: DecoratedBox( child: DecoratedBox(
@@ -246,12 +258,10 @@ class SettingsStyleView extends StatelessWidget {
Align( Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Padding( child: Padding(
padding: EdgeInsets.only( padding: const EdgeInsets.only(
right: 12, right: 12,
left: 12, left: 12,
top: accountConfig.wallpaperUrl == null top: 12,
? 0
: 12,
bottom: 12, bottom: 12,
), ),
child: Material( child: Material(

View File

@@ -118,6 +118,7 @@ flutter:
uses-material-design: true uses-material-design: true
assets: assets:
- assets/ - assets/
- assets/logo/background.png
- assets/logo/mini/ - assets/logo/mini/
- assets/miniapps/ - assets/miniapps/
- assets/sounds/ - assets/sounds/