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(
|
ListTile(
|
||||||
dense: true,
|
dense: true,
|
||||||
onTap: () =>
|
onTap: () => {
|
||||||
{Get.back(), Utils.scheduleExit(context, isFullScreen)},
|
Get.back(),
|
||||||
|
Utils.scheduleExit(this.context, isFullScreen)
|
||||||
|
},
|
||||||
leading: const Icon(Icons.hourglass_top_outlined, size: 20),
|
leading: const Icon(Icons.hourglass_top_outlined, size: 20),
|
||||||
title: const Text('定时关闭', style: titleStyle),
|
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 List<int> scheduleTimeChoices = [0, 15, 30, 45, 60];
|
||||||
const TextStyle titleStyle = TextStyle(fontSize: 14);
|
const TextStyle titleStyle = TextStyle(fontSize: 14);
|
||||||
if (isLive) {
|
if (isLive) {
|
||||||
@@ -567,6 +571,9 @@ class Utils {
|
|||||||
required Function isFullScreen,
|
required Function isFullScreen,
|
||||||
double? padding,
|
double? padding,
|
||||||
}) {
|
}) {
|
||||||
|
if (!context.mounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Get.generalDialog(
|
Get.generalDialog(
|
||||||
barrierLabel: '',
|
barrierLabel: '',
|
||||||
barrierDismissible: true,
|
barrierDismissible: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user