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

@@ -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(