TreeColumn.value constructor
TreeColumn.value(
- Object? value, {
- String formatter(
- Object? value
- TextStyle? style,
- TextAlign? textAlign,
- int? maxLines,
- TextOverflow? overflow,
- double? autoSizeWidth,
- ColumnAutoSizeWidthBuilder? autoSizeWidthBuilder,
- Object? sortValue,
- Object? filterValue,
- TreeDataTableCellCallback? onTap,
- TreeDataTableCellCallback? onDoubleTap,
- TreeDataTableCellCallback? onSecondaryTap,
- TreeDataTableCellCallback? onHover,
Creates a text cell from a raw value.
The displayed text defaults to value.toString(). The original value is
also used as the default sortValue and filterValue, so formatted
numbers, dates, and other comparable values can keep their natural sort
and filter behavior.
Implementation
TreeColumn.value(
Object? value, {
String Function(Object? value)? formatter,
TextStyle? style,
TextAlign? textAlign,
int? maxLines,
TextOverflow? overflow,
this.autoSizeWidth,
this.autoSizeWidthBuilder,
Object? sortValue,
Object? filterValue,
this.onTap,
this.onDoubleTap,
this.onSecondaryTap,
this.onHover,
}) : widget = Text(
formatter?.call(value) ?? value?.toString() ?? '',
style: style,
textAlign: textAlign,
maxLines: maxLines,
overflow: overflow,
),
sortValue = sortValue ?? value,
filterValue = filterValue ?? sortValue ?? value,
assert(autoSizeWidth == null || (autoSizeWidth.isFinite && autoSizeWidth >= 0));