simple_time_range_picker 0.0.1 copy "simple_time_range_picker: ^0.0.1" to clipboard
simple_time_range_picker: ^0.0.1 copied to clipboard

outdated

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 #

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
timeRangeViewType TimeRangeViewType.start first view at startor end time
onStartTimeChange callback for changed start time
onEndTimeChange callback for changed end time
onSubmitted callback for submitted
onCancel callback for canceled