saveNotification method

Future saveNotification ()

Saves notification in db

Implementation

saveNotification() async {
  cancelScheduledNotification();
  parent.notificationModel = new NotificationModel();
  parent.notificationModel.makeData(_chosenTime);
  if (parent.nm != null) parent.notificationModel.note = parent.nm.id;
  parent.notificationModel = await NotesDatabaseService.db
      .addNotificationInDB(parent.notificationModel);
  if (parent.notificationModel.id != null) scheduleNotification();
}