Added flavours
This commit is contained in:
parent
d57aad54ee
commit
daa1ae343f
2 changed files with 16 additions and 1 deletions
|
|
@ -22,8 +22,10 @@ also you can run with `watch` instead of `build` to build with any code change.
|
||||||
|
|
||||||
Generate apk with:
|
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
|
## Testing
|
||||||
|
|
||||||
Run `flutter test` for doing unit testing.
|
Run `flutter test` for doing unit testing.
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,19 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flavorDimensions "flavor-type"
|
||||||
|
|
||||||
|
productFlavors {
|
||||||
|
development {
|
||||||
|
dimension "flavor-type"
|
||||||
|
applicationIdSuffix ".dev"
|
||||||
|
versionNameSuffix "-dev"
|
||||||
|
}
|
||||||
|
production {
|
||||||
|
dimension "flavor-type"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue