mudular code ready to fork

This commit is contained in:
gitea
2025-11-08 12:54:40 +01:00
parent 5f8d8330f5
commit 8c6bf598f5
21 changed files with 288 additions and 519 deletions
+1 -15
View File
@@ -1,22 +1,8 @@
import 'package:flutter_dotenv/flutter_dotenv.dart';
import '../core/exceptions/invalid_environment_exception.dart';
import 'app_config.dart';
import '../data/firebase/models/firebase_config.dart';
/// Exception thrown when an invalid environment is provided to [ConfigLoader].
class InvalidEnvironmentException implements Exception {
/// The invalid environment that was provided.
final String environment;
/// Creates an [InvalidEnvironmentException] with the provided environment.
InvalidEnvironmentException(this.environment);
@override
String toString() {
return 'InvalidEnvironmentException: Invalid environment "$environment". '
'Valid environments are: dev, prod';
}
}
/// Loads application configuration based on the specified environment.
///
/// This class provides a factory method to load configuration for either