Skip to content

Commit

Permalink
opt: get dynamicDetailRatio
Browse files Browse the repository at this point in the history
Closes #66

Signed-off-by: bggRGjQaUbCoE <[email protected]>
  • Loading branch information
bggRGjQaUbCoE committed Dec 29, 2024
1 parent e2f8cb8 commit 7f05ce4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/utils/storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,14 @@ class GStorage {
static bool get showArgueMsg =>
setting.get(SettingBoxKey.showArgueMsg, defaultValue: true);

static List<double> get dynamicDetailRatio =>
setting.get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0]);
static List<double> get dynamicDetailRatio => setting
.get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0])
.map((value) => value is double
? value
: value is int
? value.toDouble()
: 1.0)
.toList();

static List<int> get blackMidsList => List<int>.from(GStorage.localCache
.get(LocalCacheKey.blackMidsList, defaultValue: <int>[]));
Expand Down

0 comments on commit 7f05ce4

Please sign in to comment.