CupertinoCalendarDateRemindsView constructor

CupertinoCalendarDateRemindsView(
  1. DateTime currentDay, {
  2. required DateRemindList dateRemindList,
  3. DateRemindWidgetStyle dateRemindWidgetStyle = const DateRemindWidgetStyle(),
  4. SelectDateRemindHandler? onPress,
  5. SelectDateRemindHandler? onLongPress,
  6. String? locale,
})

Create a Widget for listing DateRemind from dateRemindList

Throws AssertionError if found non-ongoing DateRemind in dateRemindList

Implementation

CupertinoCalendarDateRemindsView(this.currentDay,
    {required DateRemindList dateRemindList,
    this.dateRemindWidgetStyle = const DateRemindWidgetStyle(),
    this.onPress,
    this.onLongPress,
    this.locale})
    : assert(dateRemindList.where((dr) => !dr.isOngoing(currentDay)).isEmpty,
          "Ensure all date reminds are ongoing"),
      _drl = []
        ..addAll(dateRemindList.holiday)
        ..addAll(dateRemindList.events);