This commit is contained in:
ytc1012
2025-11-26 16:32:47 +08:00
parent 96658339e1
commit 0195cdf54b
18 changed files with 1052 additions and 240 deletions

View File

@@ -30,10 +30,17 @@ class _HomeScreenState extends State<HomeScreen> {
}
Future<void> _loadDefaultDuration() async {
final duration = await SettingsScreen.getDefaultDuration();
setState(() {
_defaultDuration = duration;
});
try {
final duration = await SettingsScreen.getDefaultDuration();
setState(() {
_defaultDuration = duration;
});
} catch (e) {
// Use default duration if loading fails
setState(() {
_defaultDuration = 25;
});
}
}
@override