Skip to content

Commit b0ecaa6

Browse files
committed
Rebase: onto develop resolved conflicts...
...according to the latest dynamic env.
1 parent 124e187 commit b0ecaa6

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

lib/vaahextendflutter/base/base_controller.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import 'package:sentry_flutter/sentry_flutter.dart';
1111

1212
import '../app_theme.dart';
1313
import '../env/env.dart';
14+
import '../env/storage.dart';
1415
import '../services/api.dart';
1516
import '../services/dynamic_links.dart';
1617
import '../services/notification/internal/notification.dart';

lib/vaahextendflutter/env/env.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import 'package:json_annotation/json_annotation.dart';
99
import '../services/logging_library/logging_library.dart';
1010
import 'logging.dart';
1111
import 'notification.dart';
12+
import 'storage.dart';
1213

1314
part 'env.g.dart';
1415

@@ -58,6 +59,7 @@ class EnvironmentConfig {
5859
this.oneSignalConfig,
5960
this.pusherConfig,
6061
required this.showDebugPanel,
62+
required this.localStorageType,
6163
required this.debugPanelColor,
6264
});
6365

@@ -78,6 +80,7 @@ class EnvironmentConfig {
7880
final OneSignalConfig? oneSignalConfig;
7981
final PusherConfig? pusherConfig;
8082
final bool showDebugPanel;
83+
final LocalStorageType localStorageType;
8184
@JsonKey(fromJson: _colorFromJson, toJson: _colorToJson)
8285
final Color debugPanelColor;
8386

@@ -119,6 +122,7 @@ class EnvironmentConfig {
119122
pushNotificationsServiceType: PushNotificationsServiceType.none,
120123
internalNotificationsServiceType: InternalNotificationsServiceType.none,
121124
showDebugPanel: true,
125+
localStorageType: LocalStorageType.none,
122126
debugPanelColor: Colors.black.withOpacity(0.8),
123127
);
124128
}

lib/vaahextendflutter/env/env.g.dart

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enum LocalStorageType { hive, flutterSecureStorage, none }

lib/vaahextendflutter/services/storage/local/storage.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import '../../../env.dart';
1+
import '../../../env/env.dart';
2+
import '../../../env/storage.dart';
23
import 'services/base_service.dart';
34
import 'services/flutter_secure_storage.dart';
45
import 'services/hive.dart';
56
import 'services/no_op_storage.dart';
67

78
LocalStorageService get instanceLocal {
8-
final EnvironmentConfig envConfig = EnvironmentConfig.getEnvConfig();
9+
final EnvironmentConfig envConfig = EnvironmentConfig.getConfig;
910
switch (envConfig.localStorageType) {
1011
case LocalStorageType.hive:
1112
return LocalStorageWithHive();

0 commit comments

Comments
 (0)