createEvent method
creates a new event or edits the event passed to init() function
Implementation
// ignore: always_declare_return_types
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;
}
}