feat: Implement initial authentication, multi-environment support, and core app infrastructure.
This commit is contained in:
16
lib/config/app_config.dart
Normal file
16
lib/config/app_config.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
|
||||
enum Flavor { local, demo, dev }
|
||||
|
||||
class AppConfig {
|
||||
static late Flavor flavor;
|
||||
|
||||
static String get envFileName => '.env.${flavor.name}';
|
||||
|
||||
static Future<void> init(Flavor f) async {
|
||||
flavor = f;
|
||||
await dotenv.load(fileName: envFileName);
|
||||
}
|
||||
|
||||
static String get apiBaseUrl => dotenv.env['API_BASE_URL'] ?? '';
|
||||
}
|
||||
Reference in New Issue
Block a user