diff --git a/lib/screens/MatchDetails.dart b/lib/screens/MatchDetails.dart index 957f055..b729947 100644 --- a/lib/screens/MatchDetails.dart +++ b/lib/screens/MatchDetails.dart @@ -101,6 +101,8 @@ class MatchDetailsState extends State { }); Match match = await refreshMatch(); + // we need to wait to load all logged user info before building the UI + await context.read().fetchLoggedUserDetails(); refreshUsers(match); Ratings? ratings = context.read().getRatings(widget.matchId); @@ -1021,7 +1023,7 @@ class Stats extends StatelessWidget { builder: (context) { Map userAndRate = {}; match.going.keys.forEach( - (u) => userAndRate[u] = (ratings.scores ?? {})[u]); + (u) => userAndRate[u] = ratings.scores[u]); var entries = userAndRate.entries.toList(); entries.sort((a, b) => (b.value ?? -1).compareTo((a.value ?? -1))); diff --git a/pubspec.yaml b/pubspec.yaml index dac8f42..09c53a0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.1.73+353 +version: 1.1.73+354 environment: sdk: 3.1.5