Skip to content

Commit b8ae1ed

Browse files
committed
refactor: Simplify environment config selection
1 parent e0af134 commit b8ae1ed

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

lib/main.dart

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ import 'package:ht_main/bootstrap.dart';
44
// Define the current application environment here.
55
// Change this value to switch between environments for local development.
66
const app_config.AppEnvironment currentEnvironment =
7-
app_config
8-
.AppEnvironment
9-
.developmentInMemory; // Or .developmentApi, or .production
7+
app_config.AppEnvironment.development; // production/development/demo
108

119
void main() async {
1210
final appConfig = switch (currentEnvironment) {
1311
app_config.AppEnvironment.production => app_config.AppConfig.production(),
14-
app_config.AppEnvironment.developmentInMemory =>
15-
app_config.AppConfig.developmentInMemory(),
16-
app_config.AppEnvironment.developmentApi =>
17-
app_config.AppConfig.developmentApi(),
12+
app_config.AppEnvironment.demo => app_config.AppConfig.demo(),
13+
app_config.AppEnvironment.development => app_config.AppConfig.development(),
1814
};
1915
await bootstrap(appConfig);
2016
}

pubspec.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,15 @@ packages:
335335
url: "https://github.com/headlines-toolkit/ht-auth-client.git"
336336
source: git
337337
version: "0.0.0"
338+
ht_auth_inmemory:
339+
dependency: "direct main"
340+
description:
341+
path: "."
342+
ref: HEAD
343+
resolved-ref: "7276ba82bfb24550c0e19d00a1c702b55ebc10ee"
344+
url: "https://github.com/headlines-toolkit/ht-auth-inmemory"
345+
source: git
346+
version: "0.0.0"
338347
ht_auth_repository:
339348
dependency: "direct main"
340349
description:

0 commit comments

Comments
 (0)