优化代码结构,修复部分bug

This commit is contained in:
DelLevin-Home
2026-07-06 02:49:46 +08:00
parent 4a7296f00f
commit 2fdcd4551d
23 changed files with 372 additions and 356 deletions

View File

@@ -446,8 +446,9 @@ class _GameTabPageState extends State<GameTabPage> {
ElevatedButton(
onPressed: () async {
await context.read<AppProvider>().removeGame(game.id);
if (!ctx.mounted) return;
Navigator.pop(ctx);
_loadFirst();
if (mounted) _loadFirst();
},
style: ElevatedButton.styleFrom(backgroundColor: colors.error, foregroundColor: colors.onError, elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),