onufitness_mobile/lib/environment/app_environment.dart
2026-01-13 11:36:24 +05:30

28 lines
804 B
Dart

enum Environment { development, uat, production }
class AppEnvironment {
static Environment _currentEnvironment = Environment.development;
static Environment get current => _currentEnvironment;
static void setEnvironment(Environment environment) {
_currentEnvironment = environment;
}
static bool get isDevelopment =>
_currentEnvironment == Environment.development;
static bool get isUAT => _currentEnvironment == Environment.uat;
static bool get isProduction => _currentEnvironment == Environment.production;
static String get environmentName {
switch (_currentEnvironment) {
case Environment.development:
return 'Development';
case Environment.uat:
return 'UAT';
case Environment.production:
return 'Production';
}
}
}