snippets/Flutter.md

19 lines
480 B
Markdown
Raw Normal View History

2020-05-15 14:06:22 +02:00
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