t×tecexpressby TeKOcloud
DEv0.7.1
Editors & selection / FLUTTER

TxRangeSelector.

Interactive preview

Interval selection over a simple area, line or bar series.

TxRangeSelector.date

ParameterTypeDefaultMeaning
valueDateTimeRangerequiredCurrent input/option value.
minDateTimerequiredLower allowed bound.
maxDateTimerequiredUpper allowed bound.
stepDurationconst Duration(days: 1)Step size; milliseconds for Vue date ranges.
onChangedValueChanged<DateTimeRange>?nullCallback for changed; see the signature for arguments and return type.
itemsList<T>const []Entries; replaced by dataSource when bound.
dataSourceObject?nullList, configuration or DataSource instance; takes precedence over items.
argumentOfDateTime Function(T)requiredGetter for the numeric or date X axis.
valueOfdouble Function(T)requiredGetter for the numeric series value.
formatString Function(DateTime)?nullFormats range values for display.
seriesTypeString'area'Series appearance: area/line/bar.
disabledboolfalseDisables interaction.

TxRangeSelector

ParameterTypeDefaultMeaning
valueRangeValuesrequiredCurrent input/option value.
mindoublerequiredLower allowed bound.
maxdoublerequiredUpper allowed bound.
stepdouble1Step size; milliseconds for Vue date ranges.
onChangedValueChanged<RangeValues>?nullCallback for changed; see the signature for arguments and return type.
itemsList<T>const []Entries; replaced by dataSource when bound.
dataSourceObject?nullList, configuration or DataSource instance; takes precedence over items.
argumentOfdouble Function(T)requiredGetter for the numeric or date X axis.
valueOfdouble Function(T)requiredGetter for the numeric series value.
formatString Function(double)?nullFormats range values for display.
seriesTypeString'area'Series appearance: area/line/bar.
disabledboolfalseDisables interaction.
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Widget example() {
  var range = const RangeValues(20, 80);
  return StatefulBuilder(
    builder: (context, setState) => TxRangeSelector<double>(value: range, min: 0, max: 100, items: const [20, 80], argumentOf: (v) => v, valueOf: (v) => v / 2, onChanged: (v) => setState(() => range = v)),
  );
}
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Widget dateRange() => TxRangeSelector<DateTime>.date(value: DateTimeRange(start: DateTime(2026, 10, 1), end: DateTime(2026, 10, 10)), min: DateTime(2026, 10, 1), max: DateTime(2026, 11, 1), items: [DateTime(2026, 10, 5)], argumentOf: (date) => date, valueOf: (date) => 1, onChanged: (value) => debugPrint('$value'));