Flutter-Snippets
This commit is contained in:
parent
d729ed5c1d
commit
12688648d4
18
Flutter.md
Normal file
18
Flutter.md
Normal file
|
@ -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
|
Loading…
Reference in New Issue
Block a user