|
@@ -1,5 +1,6 @@
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
+import 'package:page_transition/page_transition.dart';
|
|
|
import 'package:photos/models/collection.dart';
|
|
|
import 'package:photos/models/device_collection.dart';
|
|
|
import 'package:photos/models/gallery_type.dart';
|
|
@@ -7,6 +8,7 @@ import 'package:photos/models/magic_metadata.dart';
|
|
|
import 'package:photos/models/selected_files.dart';
|
|
|
import 'package:photos/ui/components/bottom_action_bar/bottom_action_bar_widget.dart';
|
|
|
import 'package:photos/ui/components/icon_button_widget.dart';
|
|
|
+import 'package:photos/ui/create_collection_page.dart';
|
|
|
import 'package:photos/ui/viewer/actions/file_selection_actions_widget.dart';
|
|
|
import 'package:photos/utils/delete_file_util.dart';
|
|
|
import 'package:photos/utils/magic_util.dart';
|
|
@@ -94,6 +96,15 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
|
|
|
onTap: () => _onUnArchiveClick(),
|
|
|
)
|
|
|
: const SizedBox.shrink(),
|
|
|
+ widget.galleryType.showUnHideOption()
|
|
|
+ ? IconButtonWidget(
|
|
|
+ icon: Icons.visibility_off_outlined,
|
|
|
+ iconButtonType: IconButtonType.primary,
|
|
|
+ onTap: () => _selectionCollectionForAction(
|
|
|
+ CollectionActionType.unHide,
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ : const SizedBox.shrink(),
|
|
|
IconButtonWidget(
|
|
|
icon: Icons.ios_share_outlined,
|
|
|
iconButtonType: IconButtonType.primary,
|
|
@@ -119,6 +130,22 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
|
|
|
widget.selectedFiles.clearAll();
|
|
|
}
|
|
|
|
|
|
+ Future<Object?> _selectionCollectionForAction(
|
|
|
+ CollectionActionType type,
|
|
|
+ ) async {
|
|
|
+ return Navigator.push(
|
|
|
+ context,
|
|
|
+ PageTransition(
|
|
|
+ type: PageTransitionType.bottomToTop,
|
|
|
+ child: CreateCollectionPage(
|
|
|
+ widget.selectedFiles,
|
|
|
+ null,
|
|
|
+ actionType: type,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
_selectedFilesListener() {
|
|
|
widget.selectedFiles.files.isNotEmpty
|
|
|
? _bottomPosition.value = 0.0
|