getOtherMemberLocationInfo function

LocationInfo? getOtherMemberLocationInfo(
  1. String _id,
  2. String _atsign
)

will return details of others booleans for this LocationNotificationModel

Implementation

LocationInfo? getOtherMemberLocationInfo(String _id, String _atsign) {
  _id = trimAtsignsFromKey(_id);

  // for (var key in MasterLocationService().locationReceivedData.entries) {
  if ((MasterLocationService().locationReceivedData[_atsign] != null) &&
      (MasterLocationService()
              .locationReceivedData[_atsign]!
              .locationSharingFor[_id] !=
          null)) {
    var _locationSharingFor = MasterLocationService()
        .locationReceivedData[_atsign]!
        .locationSharingFor[_id]!;

    return LocationInfo(
        isSharing: _locationSharingFor.isSharing,
        isExited: _locationSharingFor.isExited,
        isAccepted: _locationSharingFor.isAccepted);
  }
  return null;
  // }
}