opt.: more params of editor page

This commit is contained in:
lollipopkit
2023-08-28 15:22:12 +08:00
parent a53ebb334b
commit e1284feae6
31 changed files with 149 additions and 87 deletions

View File

@@ -156,8 +156,22 @@ class AppRoute {
return AppRoute(DockerManagePage(key: key, spi: spi), 'docker');
}
static AppRoute editor({Key? key, required String path}) {
return AppRoute(EditorPage(key: key, path: path), 'editor');
/// - Pop true if the text is changed & [path] is not null
/// - Pop text if [path] is null
static AppRoute editor({
Key? key,
String? path,
String? text,
String? langCode,
}) {
return AppRoute(
EditorPage(
key: key,
path: path,
text: text,
langCode: langCode,
),
'editor');
}
static AppRoute fullscreen({Key? key}) {