Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-27 20:54:41 +08:00
parent 25acf3a9bb
commit b51c646415
227 changed files with 768 additions and 764 deletions

View File

@@ -28,7 +28,7 @@ class _BarSetPageState extends State<BarSetPage> {
.map((e) => Pair(first: e, second: cache?.contains(e.index) ?? true))
.toList();
if (cache != null && cache.isNotEmpty) {
final cacheIndex = {for (var (k, v) in cache.indexed) v: k};
final cacheIndex = {for (final (k, v) in cache.indexed) v: k};
list.sort((a, b) {
final indexA = cacheIndex[a.first.index] ?? cacheIndex.length;
final indexB = cacheIndex[b.first.index] ?? cacheIndex.length;

View File

@@ -45,7 +45,7 @@ class _SetDisplayModeState extends State<SetDisplayMode> {
if (kDebugMode) debugPrint(e.toString());
}
var value = setting.get(SettingBoxKey.displayMode);
final value = setting.get(SettingBoxKey.displayMode);
if (value != null) {
preferred = modes.firstWhereOrNull((e) => e.toString() == value);
}