From 047e3cd26fddebd179feb1497d40429eb33434d7 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Sun, 12 Jan 2025 19:57:17 +0800 Subject: [PATCH] fix: #147 Signed-off-by: bggRGjQaUbCoE --- lib/utils/storage.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index 2ce87749..5b2632c6 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -50,14 +50,15 @@ class GStorage { ), ); - static List get tabbarSort => setting.get(SettingBoxKey.tabbarSort, - defaultValue: TabType.values.map((item) => item.name).toList()); + static List get tabbarSort => + List.from(setting.get(SettingBoxKey.tabbarSort, + defaultValue: TabType.values.map((item) => item.name).toList())); static List> get blockSettings { - List list = setting.get( + List list = List.from(setting.get( SettingBoxKey.blockSettings, defaultValue: List.generate(SegmentType.values.length, (_) => 1), - ); + )); return SegmentType.values .map((item) => Pair( first: item, @@ -67,10 +68,10 @@ class GStorage { } static List get blockColor { - List list = setting.get( + List list = List.from(setting.get( SettingBoxKey.blockColor, defaultValue: List.generate(SegmentType.values.length, (_) => ''), - ); + )); return SegmentType.values .map((item) => list[item.index].isNotEmpty ? Color(