Fix for commit 210cfd85
parent
210cfd85bd
commit
0eeba51d46
|
@ -9,7 +9,7 @@ import '../utils/math.dart';
|
|||
class UserTileLikes extends StatefulWidget {
|
||||
final DocumentSnapshot user;
|
||||
final bool hasMatch;
|
||||
final UserProfile currentUser;
|
||||
final UserProfile? currentUser;
|
||||
final VoidCallback onUnlike;
|
||||
final VoidCallback onShowChat;
|
||||
final VoidCallback onViewInfo;
|
||||
|
@ -18,7 +18,7 @@ class UserTileLikes extends StatefulWidget {
|
|||
super.key,
|
||||
required this.user,
|
||||
required this.hasMatch,
|
||||
required this.currentUser,
|
||||
this.currentUser,
|
||||
required this.onUnlike,
|
||||
required this.onShowChat,
|
||||
required this.onViewInfo,
|
||||
|
@ -58,8 +58,8 @@ class _UserTileLikesState extends State<UserTileLikes> {
|
|||
bool hasName = userMap.containsKey(Constants.dbFieldUsersName);
|
||||
bool hasBio = userMap.containsKey(Constants.dbFieldUsersBio);
|
||||
|
||||
String? shortDist = (_otherUser != null
|
||||
? shortestDistanceBetweenUsers(widget.currentUser, _otherUser!)
|
||||
String? shortDist = (_otherUser != null && widget.currentUser != null
|
||||
? shortestDistanceBetweenUsers(widget.currentUser!, _otherUser!)
|
||||
.toStringAsFixed(0)
|
||||
: null);
|
||||
|
||||
|
|
Loading…
Reference in New Issue