mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -189,8 +189,10 @@ class HeaderControlState extends State<HeaderControl> {
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () =>
|
||||
{Get.back(), Utils.scheduleExit(context, isFullScreen)},
|
||||
onTap: () => {
|
||||
Get.back(),
|
||||
Utils.scheduleExit(this.context, isFullScreen)
|
||||
},
|
||||
leading: const Icon(Icons.hourglass_top_outlined, size: 20),
|
||||
title: const Text('定时关闭', style: titleStyle),
|
||||
),
|
||||
|
||||
@@ -104,7 +104,11 @@ class Utils {
|
||||
}
|
||||
|
||||
/// 定时关闭
|
||||
static void scheduleExit(context, isFullScreen, [bool isLive = false]) {
|
||||
static void scheduleExit(BuildContext context, isFullScreen,
|
||||
[bool isLive = false]) {
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
const List<int> scheduleTimeChoices = [0, 15, 30, 45, 60];
|
||||
const TextStyle titleStyle = TextStyle(fontSize: 14);
|
||||
if (isLive) {
|
||||
@@ -567,6 +571,9 @@ class Utils {
|
||||
required Function isFullScreen,
|
||||
double? padding,
|
||||
}) {
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
Get.generalDialog(
|
||||
barrierLabel: '',
|
||||
barrierDismissible: true,
|
||||
|
||||
Reference in New Issue
Block a user