convertLocationNotificationToJson static method
Implementation
static String convertLocationNotificationToJson(
LocationNotificationModel locationNotificationModel) {
var notification = json.encode({
'atsignCreator': locationNotificationModel.atsignCreator,
'receiver': locationNotificationModel.receiver,
'lat': locationNotificationModel.lat.toString(),
'long': locationNotificationModel.long.toString(),
'key': locationNotificationModel.key.toString(),
'from': locationNotificationModel.from != null
? locationNotificationModel.from!.toUtc().toString()
: null.toString(),
'to': locationNotificationModel.to != null
? locationNotificationModel.to!.toUtc().toString()
: null.toString(),
'isAcknowledgment': locationNotificationModel.isAcknowledgment.toString(),
'isRequest': locationNotificationModel.isRequest.toString(),
'isAccepted': locationNotificationModel.isAccepted.toString(),
'isExited': locationNotificationModel.isExited.toString(),
'updateMap': locationNotificationModel.updateMap.toString(),
'rePrompt': locationNotificationModel.rePrompt.toString(),
'isSharing': locationNotificationModel.isSharing.toString()
});
return notification;
}