Skip to content

Commit

Permalink
fixed to call setstate after score update
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-goswami committed Nov 3, 2022
1 parent 5cb6716 commit 69d4e88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/screens/create_match_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ class _PossibleMatchesState extends ConsumerState<PossibleMatches> {
final alphaScore = int.parse(_alphaScore.text);
final betaScore = int.parse(_betaScore.text);

teamScores[alphaKey] = teamScores[alphaKey]! + (alphaScore - betaScore);
teamScores[betaKey] = teamScores[betaKey]! + (betaScore - alphaScore);
setState(() {
teamScores[alphaKey] = teamScores[alphaKey]! + (alphaScore - betaScore);
teamScores[betaKey] = teamScores[betaKey]! + (betaScore - alphaScore);
});

_alphaScore.clear();
_betaScore.clear();
Expand Down

0 comments on commit 69d4e88

Please sign in to comment.