ente/lib/ui/collections/collection_list_page.dart

39 lines
908 B
Dart

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(
child: CustomScrollView(
slivers: [
SliverAppBar(
elevation: 0,
title: appTitle,
floating: true,
),
CollectionsFlexiGridViewWidget(
collections,
displayLimitCount: collections?.length ?? 0,
tag: tag,
),
],
),
),
);
}
}