Hi !!! Everyone I have created this repository to help everyone setup the flavors in flutter in 4 easy steps.
If you you like this code please star this repository and show your support
-
Clone this repository
-
rename the folder (i.e. flavourboilerplate) to your app name
-
Open the folder in vscode and search for flavourboilerplate and replace each instance with your app name
-
Replace the development_icon.png,staging_icon.jpg,production_icon.jpg with your app icon image
IMPORTANT: Follow the same naming pattern for images
-
open the build.gradle in the android/app/ folder
-
replace APP_NAME_PRODUCTION, APP_NAME_STAGING, APP_NAME_DEVELOPMENT with your app's name
-
open the Runner.xcworkspace in XCODE
-
double click on the Runner file in the target and change the display name APP NAME to your app name
-
search for APP_DISPLAY_NAME and rename the APP NAME for all the schemes
-
search for Product Bundle Identifier and rename the package name
NOTE: If you have replaced all flavourboilerplate with your app name in the first step this will be replaced automatically
- run this command in the terminal to generate the icons
flutter pub run flutter_launcher_icons:main -f flutter_launcher_icons*
Your project is ready with three flavours.
Enjoyy.......