range property
For example,
RangeInput(
...
id="range-input",
range: const RangeType(
start: 1990,
end: 2012,
),
)
It is possible to pass range values(start/ end) as a number
or an List/ array
of numbers.
Passing range as a number
renders an input box, else a dropdown is displayed incase of List/ array
of numbers.
For example,
RangeInput(
...
id="range-input",
range: const RangeType(
start: 1980,
end: [1990, 2000, 2010],
),
)
Moreover, you can pass the first element of the List/ array
as other
,
which when selected from the dropdown, opens up an input field to enter custom values.
Passing the last element of the List/ array
as 'no_limit' sets an unbounded upper limit.
For example,
RangeInput(
...
id="range-input",
range: const RangeType(
start: 1990,
end: ['other', 1990, 2000, 2010, 'no_limit'],
),
)
Implementation
final RangeType range;