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:
@@ -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,
|
||||||
|
|||||||
@@ -176,21 +176,35 @@ class SettingsStyleView extends StatelessWidget {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
if (accountConfig.wallpaperUrl != null)
|
|
||||||
Opacity(
|
Opacity(
|
||||||
opacity: controller.wallpaperOpacity,
|
opacity: accountConfig.wallpaperUrl != null
|
||||||
|
? controller.wallpaperOpacity
|
||||||
|
: 0.3,
|
||||||
child: ImageFiltered(
|
child: ImageFiltered(
|
||||||
imageFilter: ImageFilter.blur(
|
imageFilter: ImageFilter.blur(
|
||||||
sigmaX: controller.wallpaperBlur,
|
sigmaX: accountConfig.wallpaperUrl != null
|
||||||
sigmaY: controller.wallpaperBlur,
|
? controller.wallpaperBlur
|
||||||
|
: 0.0,
|
||||||
|
sigmaY: accountConfig.wallpaperUrl != null
|
||||||
|
? controller.wallpaperBlur
|
||||||
|
: 0.0,
|
||||||
|
),
|
||||||
|
child: accountConfig.wallpaperUrl != null
|
||||||
|
? MxcImage(
|
||||||
|
key: ValueKey(
|
||||||
|
accountConfig.wallpaperUrl,
|
||||||
),
|
),
|
||||||
child: MxcImage(
|
|
||||||
key: ValueKey(accountConfig.wallpaperUrl),
|
|
||||||
uri: accountConfig.wallpaperUrl,
|
uri: accountConfig.wallpaperUrl,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
isThumbnail: true,
|
isThumbnail: true,
|
||||||
width: FluffyThemes.columnWidth * 2,
|
width: FluffyThemes.columnWidth * 2,
|
||||||
height: 212,
|
height: 212,
|
||||||
|
)
|
||||||
|
: Image.asset(
|
||||||
|
'assets/logo/background.png',
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: FluffyThemes.columnWidth * 2,
|
||||||
|
height: 212,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -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(
|
||||||
|
|||||||
@@ -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/
|
||||||
|
|||||||
Reference in New Issue
Block a user