opt.: loading dialog
This commit is contained in:
@@ -148,9 +148,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) {
|
||||
context.showLoadingDialog();
|
||||
await File(widget.path!).writeAsString(_controller.text);
|
||||
context.pop();
|
||||
await context.showLoadingDialog(
|
||||
fn: () => File(widget.path!).writeAsString(_controller.text),
|
||||
);
|
||||
|
||||
context.pop(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user