opt.: use new routes

This commit is contained in:
lollipopkit
2023-08-23 21:51:50 +08:00
parent 93f6368753
commit 536fbedda2
14 changed files with 47 additions and 130 deletions

View File

@@ -110,8 +110,15 @@ class AppRoute {
return AppRoute(SSHVirtKeySettingPage(key: key), 'ssh_virt_key_setting');
}
static AppRoute localStorage({Key? key}) {
return AppRoute(LocalStoragePage(key: key), 'local_storage');
static AppRoute localStorage(
{Key? key, bool isPickFile = false, String? initDir}) {
return AppRoute(
LocalStoragePage(
key: key,
isPickFile: isPickFile,
initDir: initDir,
),
'local_storage');
}
static AppRoute sftpMission({Key? key}) {

View File

@@ -11,7 +11,6 @@ import '../../data/model/server/snippet.dart';
import '../../data/provider/snippet.dart';
import '../../data/res/ui.dart';
import '../../locator.dart';
import '../../view/page/snippet/edit.dart';
import '../../view/widget/picker.dart';
import '../persistant_store.dart';
import '../route.dart';
@@ -146,7 +145,7 @@ void showSnippetDialog(
TextButton(
onPressed: () {
context.pop();
AppRoute(const SnippetEditPage(), 'edit snippet').go(context);
AppRoute.snippetEdit().go(context);
},
child: Text(s.add),
)