fix elevation

This commit is contained in:
Salvatore Giordano
2022-04-27 11:15:51 +02:00
parent 681cee09f5
commit 81c4207b04
3 changed files with 9 additions and 9 deletions
@@ -65,7 +65,7 @@ class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
this.leading,
this.actions,
this.backgroundColor,
this.elevation,
this.elevation = 1,
}) : preferredSize = const Size.fromHeight(kToolbarHeight),
super(key: key);
@@ -108,7 +108,7 @@ class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
final Color? backgroundColor;
/// The elevation for this [ChannelHeader].
final double? elevation;
final double elevation;
@override
Widget build(BuildContext context) {
@@ -153,7 +153,7 @@ class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
systemOverlayStyle: theme.brightness == Brightness.dark
? SystemUiOverlayStyle.light
: SystemUiOverlayStyle.dark,
elevation: elevation ?? 1,
elevation: elevation,
leading: leadingWidget,
backgroundColor: backgroundColor ?? channelHeaderTheme.color,
actions: actions ??
@@ -60,7 +60,7 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
this.leading,
this.actions,
this.backgroundColor,
this.elevation,
this.elevation = 1,
}) : super(key: key);
/// Pass this if you don't have a [StreamChatClient] in your widget tree.
@@ -100,7 +100,7 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
final Color? backgroundColor;
/// The elevation for this [ChannelListHeader].
final double? elevation;
final double elevation;
@override
Widget build(BuildContext context) {
@@ -136,7 +136,7 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
systemOverlayStyle: theme.brightness == Brightness.dark
? SystemUiOverlayStyle.light
: SystemUiOverlayStyle.dark,
elevation: elevation ?? 1,
elevation: elevation,
backgroundColor:
backgroundColor ?? channelListHeaderThemeData.color,
centerTitle: centerTitle,
@@ -71,7 +71,7 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
this.onTitleTap,
this.showTypingIndicator = true,
this.backgroundColor,
this.elevation,
this.elevation = 1,
}) : preferredSize = const Size.fromHeight(kToolbarHeight),
super(key: key);
@@ -111,7 +111,7 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
final Color? backgroundColor;
/// The elevation for this [ThreadHeader].
final double? elevation;
final double elevation;
@override
Widget build(BuildContext context) {
@@ -143,7 +143,7 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
systemOverlayStyle: theme.brightness == Brightness.dark
? SystemUiOverlayStyle.light
: SystemUiOverlayStyle.dark,
elevation: elevation ?? 1,
elevation: elevation,
leading: leading ??
(showBackButton
? StreamBackButton(