| Prochaine révision | Révision précédente |
| mobile:flutter [2023/02/24 01:11] – créée jcheron | mobile:flutter [2023/02/24 01:29] (Version actuelle) – [Thèmes spécifiques] jcheron |
|---|
| ===== Hello World ===== | ===== Hello World ===== |
| |
| <sxh dart;title:lib/main.dart> | <sxh java;title:lib/main.dart> |
| // Copyright 2018 The Flutter team. All rights reserved. | // Copyright 2018 The Flutter team. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be | // Use of this source code is governed by a BSD-style license that can be |
| |
| ==== Ajout de package ==== | ==== Ajout de package ==== |
| | <sxh bash;gutter:false> |
| flutter pub add english_words | flutter pub add english_words |
| Mise à jour | </sxh> |
| | ==== Mise à jour ==== |
| | <sxh bash;gutter:false> |
| flutter pub get | flutter pub get |
| Liste des librairies | </sxh> |
| | ==== Liste des librairies ==== |
| https://pub.dev/ | https://pub.dev/ |
| Incorparation | ==== Incorparation ==== |
| lib/main.dart | <sxh java;title:lib/main.dart;gutter:false> |
| import 'package:english_words/english_words.dart'; | import 'package:english_words/english_words.dart'; |
| Compilation | </sxh> |
| Ajout du support Desktop à un projet existant : | ===== Compilation ===== |
| |
| | Ajout du support Desktop à un projet existant : |
| | <sxh bash;gutter:false> |
| flutter create --platforms=windows,macos,linux . | flutter create --platforms=windows,macos,linux . |
| Formattage du code | </sxh> |
| | ==== Formattage du code ==== |
| | <sxh bash;gutter:false> |
| dart format bin lib | dart format bin lib |
| Build pour le web : | </sxh> |
| | ==== Build pour le web : ==== |
| | <sxh bash;gutter:false> |
| flutter build web | flutter build web |
| Thèmes spécifiques | </sxh> |
| State management | ===== Thèmes spécifiques ===== |
| Navigation | * State management |
| Solutions de persistance | * Navigation |
| Firebase authentification | * Solutions de persistance |
| Structure de projet | * [[https://firebase.flutter.dev/docs/auth/overview|Firebase authentification]] |
| Voir Flutter project structure | ===== Structure de projet ===== |
| | |
| | Voir [[https://medium.com/flutter-community/scalable-folder-structure-for-flutter-applications-183746bdc320|Flutter project structure]] |
| | |
| | ===== Liens ===== |
| | |
| | * [[https://medium.com/google-developer-experts/packages-flutter-650ec2ca29c2|Packages indispensables]] |
| | * [[https://app.quicktype.io/|Génération des models]] |
| | * [[https://www.getwidget.dev/|GetWidget]] |
| | * [[https://flutterawesome.com/|Flutter awesome]] |
| | ==== Packages ==== |
| |
| Liens | * https://pub.dev/packages/json_serializable |
| Packages indispensables | * https://pub.dev/packages/auto_route |
| Génération des models | * https://drift.simonbinder.eu/docs/getting-started/ |
| GetWidget | * https://pub.dev/packages/provider |
| Flutter awesome | * https://pub.dev/packages/getwidget |
| Packages | * https://pub.dev/packages/circular_countdown_timer |
| https://pub.dev/packages/json_serializable | * https://pub.dev/packages/flutter_tts |
| https://pub.dev/packages/auto_route | |
| https://drift.simonbinder.eu/docs/getting-started/ | |
| https://pub.dev/packages/provider | |
| https://pub.dev/packages/getwidget | |
| https://pub.dev/packages/circular_countdown_timer | |
| https://pub.dev/packages/flutter_tts | |