TimeRange constructor
TimeRange({
- Key? key,
- required int timeBlock,
- required TimeRangeSelectedCallback onRangeCompleted,
- required TimeOfDay firstTime,
- required TimeOfDay lastTime,
- TimeSelectedCallback? onFirstTimeSelected,
- int? minimalTimeRange,
- int timeStep = 60,
- Widget? fromTitle,
- Widget? toTitle,
- double titlePadding = 0,
- TimeRangeResult? initialRange,
- Color? borderColor,
- Color? activeBorderColor,
- Color? backgroundColor,
- Color? activeBackgroundColor,
- TextStyle? textStyle,
- TextStyle? activeTextStyle,
- 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);