TreeRowNode.fromValues constructor
TreeRowNode.fromValues({
- Object? id,
- int? level,
- required List<
Object?> values, - List<
TreeRowNode> rows = const [], - bool? hasChildren,
- bool isExpanded = false,
- double height = 51,
- void onExpansionChanged(
- bool isExpanded
- bool selectable = true,
- void onSelectedChanged(
- bool isExpanded
- TreeDataTableRowCallback? onTap,
- TreeDataTableRowCallback? onDoubleTap,
- TreeDataTableRowCallback? onSecondaryTap,
Creates a text row from raw values.
Each value is rendered with toString(). The original value is also used
for sorting and filtering, so numeric and date values can keep their
natural ordering while still displaying as text.
Implementation
TreeRowNode.fromValues({
this.id,
this.level,
required List<Object?> values,
this.rows = const [],
bool? hasChildren,
this.isExpanded = false,
this.height = 51,
this.onExpansionChanged,
this.selectable = true,
this.onSelectedChanged,
this.onTap,
this.onDoubleTap,
this.onSecondaryTap,
}) : columns = values.map((value) => TreeColumn.value(value)).toList(growable: false),
hasChildren = hasChildren ?? rows.isNotEmpty,
assert(values.isNotEmpty, 'Values must not be empty'),
assert(height > 0, 'height must be greater than zero');