Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-29 17:55:15 +08:00
parent 21fad89cde
commit 99634a66ab
9 changed files with 107 additions and 134 deletions

View File

@@ -154,12 +154,16 @@ abstract final class PageUtils {
),
TextButton(
onPressed: () {
Get.back();
int choice = int.tryParse(duration) ?? 0;
shutdownTimerService
..scheduledExitInMinutes = choice
..startShutdownTimer();
setState(() {});
try {
final choice = int.parse(duration);
Get.back();
shutdownTimerService
..scheduledExitInMinutes = choice
..startShutdownTimer();
setState(() {});
} catch (e) {
SmartDialog.showToast(e.toString());
}
},
child: const Text('确定'),
),