From 12688648d4ef10638c9e35b537146744cefd677e Mon Sep 17 00:00:00 2001 From: gutmet Date: Fri, 15 May 2020 14:06:22 +0200 Subject: [PATCH] Flutter-Snippets --- Flutter.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Flutter.md diff --git a/Flutter.md b/Flutter.md new file mode 100644 index 0000000..f75ff06 --- /dev/null +++ b/Flutter.md @@ -0,0 +1,18 @@ +Flutter +======= + +Async Speichern +=============== +``` +showDialog(context: context, barrierDismissible: false, + builder: (BuildContext context) { return AlertDialog(content: Text("Saving...")); }); +await saveToSomething() +Navigator.of(context, rootNavigator: true).pop(); +``` + +Async Laden initial +=================== +* Initial nur den Loading Screen anzeigen +* in InitState das async-Laden aufrufen +* darin await LoadFromSomething() +* dann Navigator.pushReplacement zur Home-Route