feat(ui): added backgroundColor property to GalleryFooter
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -27,6 +27,7 @@ class GalleryFooter extends StatefulWidget implements PreferredSizeWidget {
|
|||||||
this.totalPages = 0,
|
this.totalPages = 0,
|
||||||
this.mediaAttachments = const [],
|
this.mediaAttachments = const [],
|
||||||
this.mediaSelectedCallBack,
|
this.mediaSelectedCallBack,
|
||||||
|
this.backgroundColor,
|
||||||
}) : preferredSize = const Size.fromHeight(kToolbarHeight),
|
}) : preferredSize = const Size.fromHeight(kToolbarHeight),
|
||||||
super(key: key);
|
super(key: key);
|
||||||
|
|
||||||
@@ -55,6 +56,9 @@ class GalleryFooter extends StatefulWidget implements PreferredSizeWidget {
|
|||||||
/// Callback when media is selected
|
/// Callback when media is selected
|
||||||
final ValueChanged<int>? mediaSelectedCallBack;
|
final ValueChanged<int>? mediaSelectedCallBack;
|
||||||
|
|
||||||
|
/// The background color of this [GalleryFooter].
|
||||||
|
final Color? backgroundColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_GalleryFooterState createState() => _GalleryFooterState();
|
_GalleryFooterState createState() => _GalleryFooterState();
|
||||||
|
|
||||||
@@ -90,7 +94,8 @@ class _GalleryFooterState extends State<GalleryFooter> {
|
|||||||
context: context,
|
context: context,
|
||||||
removeTop: true,
|
removeTop: true,
|
||||||
child: BottomAppBar(
|
child: BottomAppBar(
|
||||||
color: galleryFooterThemeData.backgroundColor,
|
color:
|
||||||
|
widget.backgroundColor ?? galleryFooterThemeData.backgroundColor,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
Reference in New Issue
Block a user