createEvent method

dynamic createEvent({
  1. bool isEventOverlap = false,
  2. BuildContext? context,
})

Implementation

createEvent({bool isEventOverlap = false, BuildContext? context}) async {
  var result;
  if (isEventUpdate) {
    eventNotificationModel!.isUpdate = true;
    result = await editEvent();
    return result;
  } else {
    result = await sendEventNotification();
    if (result is bool && result && isEventOverlap) {
      Navigator.of(context!).pop();
      Navigator.of(context).pop();
    }
    return result;
  }
}