Skip to content

Instantly share code, notes, and snippets.

@iranjunior
Created June 28, 2021 21:18
Show Gist options
  • Save iranjunior/da79b5f488df09f3b77cf8340567c0bc to your computer and use it in GitHub Desktop.
Save iranjunior/da79b5f488df09f3b77cf8340567c0bc to your computer and use it in GitHub Desktop.
Arquivo gerado pela biblioteca de flutter_flavorizr, e sendo reaproveitado para trazer valores para o app
enum Flavor {
DEV,
HOMOLOG,
PROD,
}
class F {
static Flavor? appFlavor;
static String get title {
switch (appFlavor) {
case Flavor.DEV:
return 'Dev App';
case Flavor.HOMOLOG:
return 'Homolog App';
case Flavor.PROD:
return 'App';
default:
return 'App';
}
}
static String get apiBaseURL {
switch (appFlavor) {
case Flavor.DEV:
return 'http://api.teste-dev.com/api';
case Flavor.PROD:
return 'http://api.teste.com/api';
default:
return 'http://api.teste.com/api';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment