Improve error handling and parsing a little
This commit is contained in:
@@ -106,7 +106,15 @@ class _GameCardState extends State<GameCard>
|
||||
_controller.repeat();
|
||||
|
||||
final updatedGame = widget.game;
|
||||
await updatedGame.updateActualVersion();
|
||||
try {
|
||||
await updatedGame.updateActualVersion();
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(e.toString())));
|
||||
}
|
||||
}
|
||||
widget.onGameUpdated(updatedGame);
|
||||
|
||||
_controller.stop();
|
||||
|
||||
Reference in New Issue
Block a user