In this example we use json-server to simulate the backend.
npm install -g json-server
json-server db.json
You need to create .env there's one sample to help you for more details check de package envify
flutter pub get
flutter pub run build_runner watch --delete-conflicting-outputs # run in diffent tab
flutter run --flavor dev # run in debug mode
flutter run --release --flavor prod # run in release mode
OBS: Sometimes it throws error in android because flutter need all flavors release build to run correctly.
Check this settings link to implement firebase with different flavors