Added flavours

This commit is contained in:
Vicente J. Ruiz Jurado 2018-08-04 22:41:37 +02:00
parent d57aad54ee
commit daa1ae343f
2 changed files with 16 additions and 1 deletions

View file

@ -22,8 +22,10 @@ also you can run with `watch` instead of `build` to build with any code change.
Generate apk with:
```
flutter build apk -t lib/mainProd.dart
flutter build apk -t lib/mainProd.dart --flavor production
```
also you can run with `-t lib/mainDev.dart --flavor development`. More info about flavors [here](https://medium.com/@salvatoregiordanoo/flavoring-flutter-392aaa875f36).
## Testing
Run `flutter test` for doing unit testing.

View file

@ -55,6 +55,19 @@ android {
}
}
flavorDimensions "flavor-type"
productFlavors {
development {
dimension "flavor-type"
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
}
production {
dimension "flavor-type"
}
}
}
flutter {