getNextDate method
Get the next valid date for a notification schedule
Implementation
@override
Future<DateTime?> getNextDate(NotificationSchedule schedule,
{DateTime? fixedDate}) async {
fixedDate ??= DateTime.now().toUtc();
Map parameters = {
NOTIFICATION_INITIAL_FIXED_DATE:
LocalDateUtils.parseDateToString(fixedDate),
NOTIFICATION_SCHEDULE: schedule.toMap()
};
final String? nextDate = await methodChannel.invokeMethod(
CHANNEL_METHOD_GET_NEXT_DATE, parameters);
if (nextDate == null) return null;
return LocalDateUtils.parseStringToDate(nextDate)!;
}