👽 Adopt the new folder system (w.i.p)

This commit is contained in:
2025-11-14 01:04:15 +08:00
parent 05ac04e9a2
commit 84cfe643f5
10 changed files with 499 additions and 77 deletions

View File

@@ -13,8 +13,8 @@ import 'package:url_launcher/url_launcher_string.dart';
class FileInfoSheet extends StatelessWidget {
final SnCloudFile item;
const FileInfoSheet({super.key, required this.item});
final VoidCallback? onClose;
const FileInfoSheet({super.key, required this.item, this.onClose});
@override
Widget build(BuildContext context) {
@@ -22,6 +22,7 @@ class FileInfoSheet extends StatelessWidget {
final exifData = item.fileMeta?['exif'] as Map<String, dynamic>? ?? {};
return SheetScaffold(
onClose: onClose,
titleText: 'fileInfoTitle'.tr(),
child: SingleChildScrollView(
child: Column(

View File

@@ -8,6 +8,7 @@ class SheetScaffold extends StatelessWidget {
final Widget child;
final double heightFactor;
final double? height;
final VoidCallback? onClose;
const SheetScaffold({
super.key,
this.title,
@@ -16,6 +17,7 @@ class SheetScaffold extends StatelessWidget {
this.actions = const [],
this.heightFactor = 0.8,
this.height,
this.onClose,
});
@override
@@ -50,7 +52,11 @@ class SheetScaffold extends StatelessWidget {
...actions,
IconButton(
icon: const Icon(Symbols.close),
onPressed: () => Navigator.pop(context),
onPressed:
() =>
onClose != null
? onClose?.call()
: Navigator.pop(context),
style: IconButton.styleFrom(minimumSize: const Size(36, 36)),
),
],