Skip to content

Commit

Permalink
quickfix: scoreboard state
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesbrandenburger committed Feb 21, 2024
1 parent 4746a00 commit 0d9e880
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/lib/components/general/quiz/QuizScoreboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ class _QuizScoreboardState extends State<QuizScoreboard> {
_scoreboard = widget.scoreboard;
}

@override
void didUpdateWidget(QuizScoreboard oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.scoreboard != widget.scoreboard) {
setState(() {
_scoreboard = widget.scoreboard;
});
}
}

@override
Widget build(BuildContext context) {
final colors = Theme.of(context).colorScheme;
Expand Down

0 comments on commit 0d9e880

Please sign in to comment.