1 / 5

How to add flavors support_ - Flutter

Flavors are typically used to build your app for different environments such as dev and prod.

Tapan4
Télécharger la présentation

How to add flavors support_ - Flutter

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How to add flavors support? - Flutter

  2. Why do you need flavors? Flavors are typically used to build your app for different environments such as dev and prod. For eg. - your development version of the app might want to point to an API host at dev.api.myapp.com - and your production version of the app might want to point to api.myapp.com. Instead of hardcoding these values into variables and building an app for every environment manually, the right approach is to use flavors, and supply these values as build time configurations.

  3. Custom Schemes You need to create two schemes for two different environments: dev & prod. Follow the directions below: ● Create Scheme: dev -> Create debug, release and profile configuration for this new scheme (Project Runner -> Configuration-> Duplicate debug, release and profile configs for dev scheme) ● Rename existing Runner default scheme to prod. ● Manage scheme -> Assign correct configuration to its corresponding scheme.

More Related