浏览代码

CollectionPage: Pass galleyAppBarType in the constructor

Neeraj Gupta 3 年之前
父节点
当前提交
4156b37d25
共有 1 个文件被更改,包括 6 次插入2 次删除
  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 {
 class CollectionPage extends StatelessWidget {
   final CollectionWithThumbnail c;
   final CollectionWithThumbnail c;
   final String tagPrefix;
   final String tagPrefix;
+  final GalleryAppBarType appBarType;
   final _selectedFiles = SelectedFiles();
   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);
       : super(key: key);
 
 
   @override
   @override
@@ -44,7 +48,7 @@ class CollectionPage extends StatelessWidget {
         Container(
         Container(
           height: Platform.isAndroid ? 80 : 100,
           height: Platform.isAndroid ? 80 : 100,
           child: GalleryAppBarWidget(
           child: GalleryAppBarWidget(
-            GalleryAppBarType.collection,
+            appBarType,
             c.collection.name,
             c.collection.name,
             _selectedFiles,
             _selectedFiles,
             collection: c.collection,
             collection: c.collection,