Member-only story
Flutter 1.0 has been released! Learn more
This sample shows you how to start with Flutter application in some main respects:
App Navigation
https://flutter.io/docs/development/ui/navigation
Bloc
https://medium.com/p/2455c60cc423
Rest API
https://pub.dartlang.org/packages/http
Work with JSON
https://flutter.io/docs/development/data-and-backend/json
App environment
In a new Flutter project, it has lib/main.dart as default.
For multi-environment, just you make a separate main file like main_dev.dart, main_staging.dart …. and use the command below to run with specific env.
flutter run -t lib/main_staging.dart# For config initial target running on iOS, update FLUTTER_TARGET at ios/Flutter/Generated.xcconfig
FLUTTER_TARGET=lib/main_staging.dart
In this app, I create a global env file with Env dev as default.
With more env, just declare in global.dart and init in the main file like