scheduleNotification method

Future<void> scheduleNotification({
  1. required int hour,
  2. required int minute,
  3. required String title,
  4. required String body,
  5. required String payload,
})

Implementation

Future<void> scheduleNotification(
    {required int hour,
    required int minute,
    required String title,
    required String body,
    required String payload}) async {
  if (kDebugMode) {
    print(
        'SettingsController.scheduleNotification before updateNotificationTime');
  }
  await _settingsService
      .updateNotificationTime(TimeOfDay(hour: hour, minute: minute));
  if (kDebugMode) {
    print(
        'SettingsController.scheduleNotification before scheduleNotification');
  }
  await _notificationService.scheduleNotification(
      hour: hour,
      minute: minute,
      id: 0,
      title: title,
      body: body,
      payload: payload);
}