simple_time_range_picker 0.0.4 simple_time_range_picker: ^0.0.4 copied to clipboard
A simple time range picker for flutter
simple_time_range_picker #
A simple_time_range_picker is simple time range widget.
Overview #
Getting Started #
Usage #
TimeRangePicker.show
on call atonPressed
,onTap
etc.
RaisedButton(
child: Text("OpenPicker"),
onPressed: () => TimeRangePicker.show(
context: context,
),
);
- Use
onSubmitted
to get the submit time
RaisedButton(
child: Text("OpenPicker"),
onPressed: () => TimeRangePicker.show(
context: context,
onSubmitted: (TimeRangeValue value) {
print("${value.startTime} - ${value.endTime}");
},
),
);
API #
name | default | note |
---|---|---|
okLabel | OK |
set a label at ok button |
cancelLabel | CANCEL |
set a label at cancel button |
startTime | set a start time |
|
endTime | set a end time |
|
headerDefaultStartLabel | START |
set a label start time on header when empty |
headerDefaultEndLabel | END |
set a label end time on header when empty |
autoAdjust | true |
adjust if the start time is after the end time |
unSelectedEmpty | true |
returns null when not selected |
timeRangeViewType | TimeRangeViewType.start |
first view at start or end time |
onStartTimeChange | callback for changed start time |
|
onEndTimeChange | callback for changed end time |
|
onSubmitted | callback for submitted | |
onCancel | callback for canceled |