Site is currently on development mode

Flavoring Flutter

Last updated 294 days ago by Salvatore Giordano

flutter

If you read my last Flutter story you know that we had a problem configuring flavors in Flutter.

Why to use flavors

Working alone as a hobbyist android developer I never looked at flavors/build-config.
I did not need them, I was the only person of my team and the only stakeholder ¯_(ツ)_/¯

Here at Iakta the team is bigger and we have many customers, so if something goes wrong you cannot just yell at the mirror.

Flavors are just comfortable. They let you define some build configuration and switch them as you want. For example you could have one flavor for development, and one for production. You can set different url for api calls or different icons and app names. With a click you’re ready to develop or to release your great application.

We use a lot flavor configurations, not only for comfort, but also to be sure to deploy the right version of the app. We just set different icons and sometimes even app theme to be sure not to release an app with an api url pointing to local or staging machines. That would be very dangerous and shameful.

Usually we use from 3 to 5 different flavor per app (development, production, staging, demo..)

Read full Article