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
timeRangeViewTypeTimeRangeViewType.startfirst view at startor end time
onStartTimeChangecallback for changed start time
onEndTimeChangecallback for changed end time
onSubmittedcallback for submitted
onCancelcallback for canceled

Libraries

simple_time_range_picker