#57 AMOLED theme
This commit is contained in:
@@ -142,7 +142,6 @@ class _HomePageState extends State<HomePage>
|
||||
);
|
||||
});
|
||||
},
|
||||
elevation: 0.47,
|
||||
labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected,
|
||||
destinations: [
|
||||
NavigationDestination(
|
||||
|
||||
@@ -149,22 +149,22 @@ class _ServerPageState extends State<ServerPage>
|
||||
(pro.servers[e]?.spi.tags?.contains(_tag) ?? false))
|
||||
.toList();
|
||||
return AnimationLimiter(
|
||||
key: ValueKey(_tag),
|
||||
key: ValueKey(_tag),
|
||||
child: ReorderableListView.builder(
|
||||
header: _buildTagsSwitcher(pro),
|
||||
padding: const EdgeInsets.fromLTRB(7, 10, 7, 7),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
onReorder: (oldIndex, newIndex) => setState(() {
|
||||
pro.serverOrder.moveById(
|
||||
filtered[oldIndex],
|
||||
filtered[newIndex],
|
||||
_settingStore.serverOrder,
|
||||
);
|
||||
}),
|
||||
itemBuilder: (context, index) =>
|
||||
_buildEachServerCard(pro.servers[filtered[index]], index),
|
||||
itemCount: filtered.length,
|
||||
));
|
||||
header: _buildTagsSwitcher(pro),
|
||||
padding: const EdgeInsets.fromLTRB(7, 10, 7, 7),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
onReorder: (oldIndex, newIndex) => setState(() {
|
||||
pro.serverOrder.moveById(
|
||||
filtered[oldIndex],
|
||||
filtered[newIndex],
|
||||
_settingStore.serverOrder,
|
||||
);
|
||||
}),
|
||||
itemBuilder: (context, index) =>
|
||||
_buildEachServerCard(pro.servers[filtered[index]], index),
|
||||
itemCount: filtered.length,
|
||||
));
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -365,15 +365,17 @@ class _SettingPageState extends State<SettingPage> {
|
||||
}
|
||||
|
||||
Widget _buildThemeMode() {
|
||||
final items = ThemeMode.values.map(
|
||||
(e) {
|
||||
final str = _buildThemeModeStr(e.index);
|
||||
return PopupMenuItem(
|
||||
value: e.index,
|
||||
child: Text(str),
|
||||
);
|
||||
},
|
||||
).toList();
|
||||
final items = ThemeMode.values
|
||||
.map(
|
||||
(e) => PopupMenuItem(
|
||||
value: e.index,
|
||||
child: Text(_buildThemeModeStr(e.index)),
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
// Issue #57
|
||||
final len = ThemeMode.values.length;
|
||||
items.add(PopupMenuItem(value: len, child: Text(_buildThemeModeStr(len))));
|
||||
|
||||
return ListTile(
|
||||
title: Text(
|
||||
@@ -406,6 +408,8 @@ class _SettingPageState extends State<SettingPage> {
|
||||
return _s.light;
|
||||
case 2:
|
||||
return _s.dark;
|
||||
case 3:
|
||||
return 'AMOLED';
|
||||
default:
|
||||
return _s.auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user