|
@@ -19,6 +19,45 @@ typedef ImmichAssetGridSelectionListener = void Function(
|
|
|
Set<Asset>,
|
|
|
);
|
|
|
|
|
|
+class ImmichAssetGridView extends StatefulWidget {
|
|
|
+ final RenderList renderList;
|
|
|
+ final int assetsPerRow;
|
|
|
+ final double margin;
|
|
|
+ final bool showStorageIndicator;
|
|
|
+ final ImmichAssetGridSelectionListener? listener;
|
|
|
+ final bool selectionActive;
|
|
|
+ final Future<void> Function()? onRefresh;
|
|
|
+ final Set<Asset>? preselectedAssets;
|
|
|
+ final bool canDeselect;
|
|
|
+ final bool dynamicLayout;
|
|
|
+ final bool showMultiSelectIndicator;
|
|
|
+ final void Function(ItemPosition start, ItemPosition end)?
|
|
|
+ visibleItemsListener;
|
|
|
+ final Widget? topWidget;
|
|
|
+
|
|
|
+ const ImmichAssetGridView({
|
|
|
+ super.key,
|
|
|
+ required this.renderList,
|
|
|
+ required this.assetsPerRow,
|
|
|
+ required this.showStorageIndicator,
|
|
|
+ this.listener,
|
|
|
+ this.margin = 5.0,
|
|
|
+ this.selectionActive = false,
|
|
|
+ this.onRefresh,
|
|
|
+ this.preselectedAssets,
|
|
|
+ this.canDeselect = true,
|
|
|
+ this.dynamicLayout = true,
|
|
|
+ this.showMultiSelectIndicator = true,
|
|
|
+ this.visibleItemsListener,
|
|
|
+ this.topWidget,
|
|
|
+ });
|
|
|
+
|
|
|
+ @override
|
|
|
+ State<StatefulWidget> createState() {
|
|
|
+ return ImmichAssetGridViewState();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
|
|
|
final ItemScrollController _itemScrollController = ItemScrollController();
|
|
|
final ItemPositionsListener _itemPositionsListener =
|
|
@@ -383,42 +422,3 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-class ImmichAssetGridView extends StatefulWidget {
|
|
|
- final RenderList renderList;
|
|
|
- final int assetsPerRow;
|
|
|
- final double margin;
|
|
|
- final bool showStorageIndicator;
|
|
|
- final ImmichAssetGridSelectionListener? listener;
|
|
|
- final bool selectionActive;
|
|
|
- final Future<void> Function()? onRefresh;
|
|
|
- final Set<Asset>? preselectedAssets;
|
|
|
- final bool canDeselect;
|
|
|
- final bool dynamicLayout;
|
|
|
- final bool showMultiSelectIndicator;
|
|
|
- final void Function(ItemPosition start, ItemPosition end)?
|
|
|
- visibleItemsListener;
|
|
|
- final Widget? topWidget;
|
|
|
-
|
|
|
- const ImmichAssetGridView({
|
|
|
- super.key,
|
|
|
- required this.renderList,
|
|
|
- required this.assetsPerRow,
|
|
|
- required this.showStorageIndicator,
|
|
|
- this.listener,
|
|
|
- this.margin = 5.0,
|
|
|
- this.selectionActive = false,
|
|
|
- this.onRefresh,
|
|
|
- this.preselectedAssets,
|
|
|
- this.canDeselect = true,
|
|
|
- this.dynamicLayout = true,
|
|
|
- this.showMultiSelectIndicator = true,
|
|
|
- this.visibleItemsListener,
|
|
|
- this.topWidget,
|
|
|
- });
|
|
|
-
|
|
|
- @override
|
|
|
- State<StatefulWidget> createState() {
|
|
|
- return ImmichAssetGridViewState();
|
|
|
- }
|
|
|
-}
|