Flavors in Flutter - Multiple apps from one source code - Icon Generation

Flutter Explained · 50K views · 2021 · 28:42

Open on YouTube

Software architecture & designTesting, debugging & developer toolsWeb developmenttutorial

Why Stack Overflow recommends it

Stack Overflow users link it when answering Flutter flavor questions about running, debugging, or configuring separate builds (including separate Firebase projects) for iOS schemes and Android flavors.

Recommended by 4 people across 4 different months, 2022 to 2023.

What it is

A 28-minute Flutter tutorial from the Flutter Explained channel showing how to set up flavors so two different apps can be built from one codebase. It covers separate Dart entry points, Android Studio run configurations, iOS schemes, Android product flavors, and generating distinct app icons and install names.

What people said

Recommends Ivan Yoed · 2022-04 · Stack Overflow · on “Running Debug using Flutter Flavor?”

This answer will only be what you're looking for if you created your flavors (and schemas) correctly (check this for reference: Flavors in Flutter by Flutter Explained channel [this video] ) and if you are using android studio , since it is there were I solved it. After having followed the video or any other correct explanation or set of steps, it is true that you cannot run the debugger nor have any of the DevTools attached if you run your app through a command. For example in my case, one of my flavors is named 'staging' so the command I ran would be: flutter run --flavor staging -t lib/main_staging.dart But by doing so, yes, you can run your app, but you won't see any of the previously mention

Recommends ASAD HAMEED · 2023-05 · Stack Overflow · on “Unable to run app on IOS simulator after creating multiple schemes in Flutter”

I tried it again, but this time I didn't change the base `scheme` `Runner` or base `build config` `Debug, Release, Profile` and just added the new ones separately, and it worked. See this tutorial [this video]

Recommends Muhammad Usman · 2023-07 · Stack Overflow · on “In Flutter, is there a way to use a separate Firebase database for app testing, and then switch to using a real database when real users using app?”

You can achieve this by implementing flavors in your app. This will allow you to have separate google_services.json for each flavor in case of android and seperate GoogleServices_info.plist . Follow this video to implement flavors in your application: Link to Video [this video] Follow this medium article to integrate different firebase projects for each flavor: Link To Medium Article [LINK] If you have used flutterfire cli,then you might need to configure separate firebase_app_id_file.json for iOS,for that follow this medium article Link to Medium Article For Environment Setup [LINK] You will need to add build scripts for google_services.json file and GoogleServices_info.plist file, In order to p

Recommends FrankAi · 2023-10 · Stack Overflow · on “Flutter flavor build from Xcode different main.dart”

After many hours of research I finally found the solution. In the build settings there is a custom setting called "FLUTTER_TARGET" where you have to set the paths to your main.dart files. ALL tutorials and guides completely ignore this. [this video] In this guide you can see at the linked time at the bottom of the screen what I mean.