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
@@ -19,6 +19,7 @@ class GalleryHeader extends StatelessWidget implements PreferredSizeWidget {
this.onImageTap,
this.userName = '',
this.sentAt = '',
this.backgroundColor,
}) : preferredSize = const Size.fromHeight(kToolbarHeight),
super(key: key);
@@ -50,6 +51,9 @@ class GalleryHeader extends StatelessWidget implements PreferredSizeWidget {
/// Stores the current index of media shown
final int currentIndex;
/// The background color of this [GalleryHeader].
final Color? backgroundColor;
@override
Widget build(BuildContext context) {
final galleryHeaderThemeData = GalleryHeaderTheme.of(context);
@@ -66,7 +70,8 @@ class GalleryHeader extends StatelessWidget implements PreferredSizeWidget {
onPressed: onBackPressed,
)
: const SizedBox(),
backgroundColor: galleryHeaderThemeData.backgroundColor,
backgroundColor:
backgroundColor ?? galleryHeaderThemeData.backgroundColor,
actions: <Widget>[
if (!message.isEphemeral)
IconButton(