FDateFieldController constructor

FDateFieldController({
  1. required TickerProvider vsync,
  2. FormFieldValidator<DateTime> validator = _defaultValidator,
  3. bool truncateAndStripTimezone = true,
  4. DateTime? initialDate,
  5. Duration popoverAnimationDuration = const Duration(milliseconds: 100),
})

Creates a FDateFieldController.

Contract

Throws AssertionError if initialDate is not in UTC timezone and truncateAndStripTimezone is false.

Implementation

FDateFieldController({
  required TickerProvider vsync,
  this.validator = _defaultValidator,
  this.truncateAndStripTimezone = true,
  DateTime? initialDate,
  Duration popoverAnimationDuration = const Duration(milliseconds: 100),
}) : calendar = FPopoverController(vsync: vsync, animationDuration: popoverAnimationDuration),
     _calendar = FCalendarController.date(
       initialSelection: initialDate,
       selectable: (date) => validator(date) == null,
     );