new: editor custom theme

This commit is contained in:
lollipopkit
2023-05-28 16:25:12 +08:00
parent 68c1fe4943
commit dbabe81e3c
15 changed files with 206 additions and 171 deletions

View File

@@ -180,12 +180,14 @@ class _SFTPDownloadedPageState extends State<SFTPDownloadedPage> {
context.pop();
final stat = await file.stat();
if (stat.size > 1024 * 1024) {
showRoundDialog(context: context, child: Text('too big'));
showRoundDialog(
context: context,
child: Text(_s.fileTooLarge(fileName, stat.size, '1m')),
);
return;
}
final f = await File(file.absolute.path).readAsString();
AppRoute(EditorPage(initCode: f), 'sftp dled editor')
.go(context);
AppRoute(EditorPage(initCode: f), 'sftp dled editor').go(context);
},
)
],