mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: add configurable main page back behavior (#870)
* feat: add configurable main page back behavior Add setting to control whether back button exits directly or returns to first tab * update --------- Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -623,6 +623,17 @@ List<SettingsModel> get styleSettings => [
|
||||
subtitle: '删除或调换Navbar',
|
||||
leading: const Icon(Icons.toc_outlined),
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '返回时直接退出',
|
||||
subtitle: '开启后在主页任意tab按返回键都直接退出,关闭则先回到Navbar的第一个tab',
|
||||
leading: const Icon(Icons.exit_to_app_outlined),
|
||||
setKey: SettingBoxKey.directExitOnBack,
|
||||
defaultVal: false,
|
||||
onChanged: (value) {
|
||||
Get.find<MainController>().directExitOnBack = value;
|
||||
},
|
||||
),
|
||||
if (Platform.isAndroid)
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
|
||||
Reference in New Issue
Block a user