opt.: share on desktop (#405)

This commit is contained in:
lollipopkit🏳️‍⚧️
2024-06-22 22:50:17 +08:00
committed by GitHub
parent da8b6a9010
commit d785209eb6
8 changed files with 123 additions and 119 deletions

View File

@@ -66,18 +66,7 @@ class BackupPage extends StatelessWidget {
trailing: const Icon(Icons.save),
onTap: () async {
final path = await Backup.backup();
debugPrint("Backup path: $path");
/// Issue #188
switch (Pfs.type) {
case Pfs.windows:
final backslashPath = path.replaceAll('/', '\\');
await Process.run('explorer', ['/select,$backslashPath']);
case Pfs.linux:
await Process.run('xdg-open', [path]);
default:
await Pfs.sharePath(path);
}
await Pfs.share(path: path);
},
),
ListTile(