2023-07-04 03:41:49 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import "package:photos/models/collection.dart";
|
|
|
|
import "package:photos/ui/collections/flex_grid_view.dart";
|
|
|
|
|
|
|
|
class CollectionListPage extends StatelessWidget {
|
|
|
|
final List<Collection>? collections;
|
|
|
|
final Widget? appTitle;
|
|
|
|
final String tag;
|
|
|
|
|
|
|
|
const CollectionListPage(
|
|
|
|
this.collections, {
|
|
|
|
this.appTitle,
|
|
|
|
this.tag = "",
|
|
|
|
Key? key,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
body: SafeArea(
|
2023-07-18 13:29:59 +00:00
|
|
|
child: CustomScrollView(
|
|
|
|
slivers: [
|
|
|
|
SliverAppBar(
|
|
|
|
elevation: 0,
|
|
|
|
title: appTitle,
|
|
|
|
floating: true,
|
|
|
|
),
|
|
|
|
CollectionsFlexiGridViewWidget(
|
|
|
|
collections,
|
|
|
|
displayLimitCount: collections?.length ?? 0,
|
|
|
|
tag: tag,
|
|
|
|
),
|
|
|
|
],
|
2023-07-04 03:41:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|