A new Flutter project.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
# install pub
# build generate
dart run build_runner build # or dart run build_runner watch
# husky
dart run husky install
maby you need to use R or r to reload
- dev
# iOS
open -a Simulator && flutter run -d ios --dart-define=APP_ENV=dev
# web
flutter run -d chrome --web-port=8080 --web-hostname=localhost --dart-define=APP_ENV=dev --dart-define=BROWSER_IMAGE_DECODING_ENABLED=false --web-renderer canvaskit
- prod
# iOS
open -a Simulator && flutter run -d ios --dart-define=APP_ENV=release
# web
flutter run -d chrome --web-port=8080 --web-hostname=localhost --dart-define=APP_ENV=release --dart-define=BROWSER_IMAGE_DECODING_ENABLED=false --web-renderer canvaskit
Run the command according to the above configuration
F5, select the device in the lower right corner, the default is the local device, macos or linux or windows
- dev
# iOS
flutter build web --release --dart-define=APP_ENV=dev
# web
flutter build ios --release --dart-define=APP_ENV=dev
- prod
# iOS
flutter build ios --release --dart-define=APP_ENV=release
# web
flutter build web --release --dart-define=APP_ENV=release