Skip to content

Commit

Permalink
Merge pull request #1373 from okmsbun/user_profile_location_display_l…
Browse files Browse the repository at this point in the history
…ogic

Improve user profile location display logic
  • Loading branch information
veloce authored Jan 28, 2025
2 parents be691b7 + 0cbc57b commit 9afc756
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/view/user/user_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ class Location extends StatelessWidget {
Widget build(BuildContext context) {
return Row(
children: [
if (profile.location != null) ...[Text(profile.location!), const SizedBox(width: 5)],
if (profile.country != null) ...[
CachedNetworkImage(
imageUrl: lichessFlagSrc(profile.country!),
errorWidget: (_, __, ___) => kEmptyWidget,
),
const SizedBox(width: 5),
] else
kEmptyWidget,
Text(profile.location ?? countries[profile.country] ?? ''),
],
if (countries[profile.country] != null) Text(countries[profile.country]!),
],
);
}
Expand Down

0 comments on commit 9afc756

Please sign in to comment.