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
@@ -70,6 +70,7 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
this.actions,
this.onTitleTap,
this.showTypingIndicator = true,
this.backgroundColor,
}) : preferredSize = const Size.fromHeight(kToolbarHeight),
super(key: key);
@@ -102,6 +103,9 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
/// if a user is typing in this thread
final bool showTypingIndicator;
/// The background color of this [ThreadHeader].
final Color? backgroundColor;
@override
Widget build(BuildContext context) {
final channelHeaderTheme = ChannelHeaderTheme.of(context);
@@ -136,7 +140,7 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
showUnreads: true,
)
: const SizedBox()),
backgroundColor: channelHeaderTheme.color,
backgroundColor: backgroundColor ?? channelHeaderTheme.color,
centerTitle: true,
actions: actions,
title: InkWell(