TimeRange constructor

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

Implementation

TimeRange({
  Key? key,
  required this.timeBlock,
  required this.onRangeCompleted,
  required this.firstTime,
  required this.lastTime,
  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,
})  : assert(
          lastTime.after(firstTime), 'lastTime can not be before firstTime'),
      super(key: key);