Skip to content
pubscout

time_range

1.1.1, released 2 years ago by talhasultan.dev

Flutter widget for selecting a time range with custom steps and time blocks.

WASM-ready
$ flutter pub add time_range
Source repository

What it does

Provides a widget to select a start and end time range within defined boundaries. Allows you to specify time steps, time blocks, and customized styles for buttons, text, and borders.

AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to build a form that requires users to select a time range.
  • You need to enforce specific time blocks or step intervals for scheduling.

Skip it when

  • You need a standard native date and time picker dialog rather than an inline widget.
  • You require complex event-based calendar scheduling.

Strengths

  • Allows configuration of time steps and time blocks.
  • Fully customizable appearance including colors and text styles.

Weaknesses

  • Limited to selecting time ranges within a single day/time configuration as provided by the widget.
  • No documentation regarding advanced localization beyond device formats.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
TimeRange(
    fromTitle: Text('From', style: TextStyle(fontSize: 18)),
    toTitle: Text('To', style: TextStyle(fontSize: 18)),
    firstTime: TimeOfDay(hour: 14, minute: 30),
    lastTime: TimeOfDay(hour: 20, minute: 00),
    timeStep: 10,
    timeBlock: 30,
    onRangeCompleted: (range) => print(range),
  )

Alternatives

Packages that do the same job and could replace time_range.