opt.: show loading dialog

This commit is contained in:
lollipopkit🏳️‍⚧️
2024-07-22 23:33:21 +08:00
parent 7a359588db
commit 41ec46f1d3
8 changed files with 86 additions and 80 deletions

View File

@@ -145,10 +145,10 @@ class _EditorPageState extends State<EditorPage> {
// If path is not null, then it's a file editor
// save the text and return true to pop the page
if (widget.path != null) {
await context.showLoadingDialog(
final res = await context.showLoadingDialog(
fn: () => File(widget.path!).writeAsString(_controller.text),
);
if (res == null) return;
context.pop(true);
return;
}