#22 Add switch for run in bg

This commit is contained in:
lollipopkit
2023-03-28 17:35:49 +08:00
parent abee470afc
commit 30dddf462e
12 changed files with 71 additions and 23 deletions

View File

@@ -108,6 +108,9 @@ class _SettingPageState extends State<SettingPage> {
if (isIOS) {
children.add(_buildPushToken());
}
if (isAndroid) {
children.add(_buildBgRun());
}
return Column(
children: children.map((e) => RoundRectCard(e)).toList(),
);
@@ -499,4 +502,11 @@ class _SettingPageState extends State<SettingPage> {
() => rebuildAll(context),
);
}
Widget _buildBgRun() {
return ListTile(
title: Text(_s.bgRun),
trailing: buildSwitch(context, _setting.bgRun),
);
}
}