You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1/
i've read many tutorials on the subject including the official flutter doc and i have to admit i'm quite confused with having to create as many entry points as flavors...
That is to say one main.dart per Flavor indeed...
Isn't there a way to have an only entry point ?
I thought that it would work like this :
Entry point = main.dart
When entering main.dart, test the --flavor param of the executed cmd line
switch() on that then load correct params...
what's the point of --flavor then ? can't we just precise the entry point and have the exact same behavior without the whole flavor configuration stuff ??
2/
I already got a config.dart file where i got all my project's URLs in a Config class.
But NO base_url in common :( Since there are 30+ URLs how to correctly Flavorise them ??
is there a way to flavorise whole classes ?
For example, can i just write something like :
3/
Last but not least, how do you launch the different flavors ?
I mean for the moment i created a different config in Android Studio but what is the lib "way" to launch the different flavors ? i can't find any cmd line to launch on the pub.dev lib's page ?
Android ?
iOS ?
I'm quite confused here,
Can u help plz ?
The text was updated successfully, but these errors were encountered:
Gobmichet
changed the title
[ Flavors & entry point(s) ]
[ Entry point(s) & Flavorising classes ]
Jan 25, 2024
Hi,
Thanks for the job,
1/
i've read many tutorials on the subject including the official flutter doc and i have to admit i'm quite confused with having to create as many entry points as flavors...
That is to say one main.dart per Flavor indeed...
Isn't there a way to have an only entry point ?
I thought that it would work like this :
what's the point of --flavor then ? can't we just precise the entry point and have the exact same behavior without the whole flavor configuration stuff ??
2/
I already got a config.dart file where i got all my project's URLs in a Config class.
is there a way to flavorise whole classes ?
For example, can i just write something like :
and then use it in my code like
FlutterConfig.instance.config.urlWanted
with
Would that work ?
3/
Last but not least, how do you launch the different flavors ?
I mean for the moment i created a different config in Android Studio but what is the lib "way" to launch the different flavors ? i can't find any cmd line to launch on the pub.dev lib's page ?
Android ?
iOS ?
I'm quite confused here,
Can u help plz ?
The text was updated successfully, but these errors were encountered: