TimeRange constructor

TimeRange({
  1. Key? key,
  2. required int timeBlock,
  3. required TimeRangeSelectedCallback onRangeCompleted,
  4. required TimeOfDay firstTime,
  5. required TimeOfDay lastTime,
  6. TimeSelectedCallback? onFirstTimeSelected,
  7. int? minimalTimeRange,
  8. int timeStep = 60,
  9. Widget? fromTitle,
  10. Widget? toTitle,
  11. double titlePadding = 0,
  12. TimeRangeResult? initialRange,
  13. Color? borderColor,
  14. Color? activeBorderColor,
  15. Color? backgroundColor,
  16. Color? activeBackgroundColor,
  17. TextStyle? textStyle,
  18. TextStyle? activeTextStyle,
  19. bool alwaysUse24HourFormat = false,
})

Implementation

TimeRange({
  Key? key,
  required this.timeBlock,
  required this.onRangeCompleted,
  required this.firstTime,
  required this.lastTime,
  this.onFirstTimeSelected,
  this.minimalTimeRange,
  this.timeStep = 60,
  this.fromTitle,
  this.toTitle,
  this.titlePadding = 0,
  this.initialRange,
  this.borderColor,
  this.activeBorderColor,
  this.backgroundColor,
  this.activeBackgroundColor,
  this.textStyle,
  this.activeTextStyle,
  this.alwaysUse24HourFormat = false,
})  : assert(
        lastTime.after(firstTime),
        'lastTime can not be before firstTime',
      ),
      super(key: key);