scheduleNotification method
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);
}