feat(ui): added backgroundColor property to the various header widgets

Also updated CHANGELOG.md
This commit is contained in:
groovinchip
2021-08-06 11:39:51 -04:00
parent 8585456edd
commit 91c0a7031a
5 changed files with 23 additions and 4 deletions
@@ -67,6 +67,7 @@ class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
this.subtitle,
this.leading,
this.actions,
this.backgroundColor,
}) : preferredSize = const Size.fromHeight(kToolbarHeight),
super(key: key);
@@ -102,6 +103,9 @@ class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
/// By default it shows the [ChannelAvatar]
final List<Widget>? actions;
/// The background color for this [ChannelHeader].
final Color? backgroundColor;
@override
Widget build(BuildContext context) {
final channel = StreamChannel.of(context).channel;
@@ -141,7 +145,7 @@ class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
brightness: Theme.of(context).brightness,
elevation: 1,
leading: leadingWidget,
backgroundColor: channelHeaderTheme.color,
backgroundColor: backgroundColor ?? channelHeaderTheme.color,
actions: actions ??
<Widget>[
Padding(