simple_time_range_picker 0.0.5 icon indicating copy to clipboard operation
simple_time_range_picker: ^0.0.5 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 at onPressed ,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 #

namedefaultnote
okLabelOKset a label at ok button
cancelLabelCANCELset a label at cancel button
startTimeset a start time
endTimeset a end time
headerDefaultStartLabelSTARTset a label start time on header when empty
headerDefaultEndLabelENDset a label end time on header when empty
autoAdjusttrueadjust if the start time is after the end time
unSelectedEmptytruereturns null when not selected
timeRangeViewTypeTimeRangeViewType.startfirst view at start or end time
onStartTimeChangecallback for changed start time
onEndTimeChangecallback for changed end time
onSubmittedcallback for submitted
onCancelcallback for canceled