onLocationModelTap method
Handles the tap event on a location notification model
Implementation
void onLocationModelTap(
LocationNotificationModel locationNotificationModel, bool haveResponded) {
var currentAtsign = AtLocationNotificationListener().currentAtSign;
if (locationNotificationModel.key!
.contains(MixedConstants.SHARE_LOCATION)) {
locationNotificationModel.atsignCreator != currentAtsign
// ignore: unnecessary_statements
? (locationNotificationModel.isAccepted
? navigatorPushToMap(locationNotificationModel)
: (locationNotificationModel.isExited
? AtLocationNotificationListener().showMyDialog(
locationNotificationModel.atsignCreator,
locationNotificationModel)
: (haveResponded
? null
: AtLocationNotificationListener().showMyDialog(
locationNotificationModel.atsignCreator,
locationNotificationModel))))
: navigatorPushToMap(locationNotificationModel);
} else if (locationNotificationModel.key!
.contains(MixedConstants.REQUEST_LOCATION)) {
var _creatorDetails = getCreatorDetails(locationNotificationModel);
if (_creatorDetails == null) {
return;
}
compareAtSign(locationNotificationModel.atsignCreator!, currentAtsign!)
// ignore: unnecessary_statements
? (_creatorDetails.isAccepted
? navigatorPushToMap(locationNotificationModel)
: (_creatorDetails.isExited
? AtLocationNotificationListener().showMyDialog(
locationNotificationModel.atsignCreator,
locationNotificationModel)
: (haveResponded
? null
: AtLocationNotificationListener().showMyDialog(
locationNotificationModel.atsignCreator,
locationNotificationModel))))
// ignore: unnecessary_statements
: (_creatorDetails.isAccepted
? navigatorPushToMap(locationNotificationModel)
: null);
}
}