mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: custom page transition
Closes #682 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -177,6 +177,32 @@ List<SettingsModel> get styleSettings => [
|
||||
Get.forceAppUpdate();
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
title: '页面过渡动画',
|
||||
leading: const Icon(Icons.animation),
|
||||
getSubtitle: () => '当前:${GStorage.pageTransition.name}',
|
||||
onTap: (setState) async {
|
||||
Transition? result = await showDialog(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<Transition>(
|
||||
title: '页面过渡动画',
|
||||
value: GStorage.pageTransition,
|
||||
values: Transition.values.map((e) {
|
||||
return (e, e.name);
|
||||
}).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting
|
||||
.put(SettingBoxKey.pageTransition, result.index);
|
||||
SmartDialog.showToast('重启生效');
|
||||
setState();
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: 'MD3样式底栏',
|
||||
|
||||
Reference in New Issue
Block a user