DurationPickerDialog constructor

const DurationPickerDialog({
  1. Key? key,
  2. required Duration initialTime,
  3. BaseUnit baseUnit = BaseUnit.minute,
  4. double snapToMins = 1.0,
  5. Duration? minTime,
  6. Duration? maxTime,
  7. bool enableHapticFeedback = true,
})

Creates a duration picker.

initialTime must not be null.

Implementation

const DurationPickerDialog({
  Key? key,
  required this.initialTime,
  this.baseUnit = BaseUnit.minute,
  this.snapToMins = 1.0,
  this.minTime,
  this.maxTime,
  this.enableHapticFeedback = true,
})  : assert(
          (minTime == null || (initialTime >= minTime)) &&
                  (maxTime == null || (initialTime <= maxTime)) ||
              (minTime != null &&
                  maxTime != null &&
                  initialTime >= minTime &&
                  initialTime <= maxTime),
          'invalid time'),
      super(key: key);