aboutsummaryrefslogtreecommitdiff
path: root/Flutter.md
blob: 0958bdf4fccc72c1e5c1f148373df05ff06a5609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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

Assets
======
* Ordner 'assets' anlegen
* in pubspec.yaml -> flutter: -> assets: -> - assets/foobar.jpg   auflisten

Lokaler Package-Import
======================
* in pubspec.yaml unter dependencies den Namen des Package, dann den Pfad, z.B.:
dependencies:
  myPackage:
    path: ../myPackage