File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -830,12 +830,13 @@ class Avatar extends StatelessWidget {
830
830
final store = PerAccountStoreWidget .of (context);
831
831
final user = store.users[userId]! ;
832
832
833
- final avatarUrl = user.avatarUrl == null
834
- ? null // TODO(#255): handle computing gravatars
835
- : resolveUrl (user.avatarUrl! , store.account);
836
- final avatar = (avatarUrl == null )
833
+ final resolvedUrl = switch (user.avatarUrl) {
834
+ null => null , // TODO(#255): handle computing gravatars
835
+ var avatarUrl => resolveUrl (avatarUrl, store.account),
836
+ };
837
+ final avatar = (resolvedUrl == null )
837
838
? const SizedBox .shrink ()
838
- : RealmContentNetworkImage (avatarUrl , filterQuality: FilterQuality .medium);
839
+ : RealmContentNetworkImage (resolvedUrl , filterQuality: FilterQuality .medium);
839
840
840
841
return SizedBox .square (
841
842
dimension: size,
You can’t perform that action at this time.
0 commit comments