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
|
2020-05-23 08:56:25 +02:00
|
|
|
|
|
|
|
Assets
|
|
|
|
======
|
|
|
|
* Ordner 'assets' anlegen
|
|
|
|
* in pubspec.yaml -> flutter: -> assets: -> - assets/foobar.jpg auflisten
|
2020-05-23 16:00:32 +02:00
|
|
|
|
|
|
|
Lokaler Package-Import
|
|
|
|
======================
|
|
|
|
* in pubspec.yaml unter dependencies den Namen des Package, dann den Pfad, z.B.:
|
|
|
|
dependencies:
|
|
|
|
myPackage:
|
|
|
|
path: ../myPackage
|
2020-10-13 14:39:57 +02:00
|
|
|
* Dann normal importieren, z.B. import"package:myPackage/file123.dart"
|