Skip to content

Commit

Permalink
fix: Fixed a bug where the background was not displayed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Mar 3, 2023
1 parent 75da798 commit 500bdc2
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions packages/masamune/lib/universal/universal_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ class UniversalAppBar extends StatelessWidget {
? [...actions!, SizedBox(width: trailingSpacing)]
: null,
flexibleSpace: flexibleSpace ??
(_titlePosition == UniversalAppBarTitlePosition.bottom
? FlexibleSpaceBar(
title: SingleChildScrollView(
FlexibleSpaceBar(
title: _titlePosition == UniversalAppBarTitlePosition.bottom
? SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
Expand All @@ -459,12 +459,12 @@ class UniversalAppBar extends StatelessWidget {
),
],
),
),
background: background,
titlePadding: optimizedTitlePadding,
centerTitle: centerTitle,
)
: null),
)
: null,
background: background,
titlePadding: optimizedTitlePadding,
centerTitle: centerTitle,
),
bottom: bottom,
elevation: elevation,
shadowColor: shadowColor,
Expand Down Expand Up @@ -777,6 +777,7 @@ class UniversalAppBarBackground extends StatelessWidget {
super.key,
this.filterColor = Colors.black87,
this.fit = BoxFit.cover,
this.backgroundColor,
});

/// Specifies a background image.
Expand All @@ -794,13 +795,21 @@ class UniversalAppBarBackground extends StatelessWidget {
/// フィルターの色を指定します。
final Color filterColor;

/// Specifies the background color.
///
/// 背景色を指定します。
final Color? backgroundColor;

@override
Widget build(BuildContext context) {
return Image(
image: image,
fit: fit,
color: filterColor,
colorBlendMode: BlendMode.multiply,
return Container(
color: backgroundColor,
child: Image(
image: image,
fit: fit,
color: filterColor,
colorBlendMode: BlendMode.multiply,
),
);
}
}
Expand Down

0 comments on commit 500bdc2

Please sign in to comment.