TimeRange constructor

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

Implementation

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