Browse Source

CollectionPage: Pass galleyAppBarType in the constructor

Neeraj Gupta 3 years ago
parent
commit
4156b37d25
1 changed files with 6 additions and 2 deletions
  1. 6 2
      lib/ui/collection_page.dart

+ 6 - 2
lib/ui/collection_page.dart

@@ -14,9 +14,13 @@ import 'gallery_app_bar_widget.dart';
 class CollectionPage extends StatelessWidget {
   final CollectionWithThumbnail c;
   final String tagPrefix;
+  final GalleryAppBarType appBarType;
   final _selectedFiles = SelectedFiles();
 
-  CollectionPage(this.c, {this.tagPrefix = "collection", Key key})
+  CollectionPage(this.c,
+      {this.tagPrefix = "collection",
+      this.appBarType = GalleryAppBarType.collection,
+      Key key})
       : super(key: key);
 
   @override
@@ -44,7 +48,7 @@ class CollectionPage extends StatelessWidget {
         Container(
           height: Platform.isAndroid ? 80 : 100,
           child: GalleryAppBarWidget(
-            GalleryAppBarType.collection,
+            appBarType,
             c.collection.name,
             _selectedFiles,
             collection: c.collection,