File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ import 'package:ht_main/app/config/app_environment.dart' ;
2
+
3
+ class AppConfig {
4
+ const AppConfig ({
5
+ required this .environment,
6
+ required this .baseUrl,
7
+ // Add other environment-specific configs here (e.g., analytics keys)
8
+ });
9
+
10
+ final AppEnvironment environment;
11
+ final String baseUrl;
12
+
13
+ // Factory constructors for different environments
14
+ factory AppConfig .production () => const AppConfig (
15
+ environment: AppEnvironment .production,
16
+ baseUrl: 'http://api.yourproductiondomain.com' , // Replace with actual production URL
17
+ );
18
+
19
+ factory AppConfig .developmentInMemory () => const AppConfig (
20
+ environment: AppEnvironment .developmentInMemory,
21
+ baseUrl: 'http://localhost:8080' , // Base URL still needed for Auth API client, even if data is in-memory
22
+ );
23
+
24
+ factory AppConfig .developmentApi () => const AppConfig ( // New: For local Dart Frog API
25
+ environment: AppEnvironment .developmentApi,
26
+ baseUrl: 'http://localhost:8080' , // Default Dart Frog local URL
27
+ );
28
+ }
You can’t perform that action at this time.
0 commit comments