TreeColumn.text constructor

TreeColumn.text(
  1. String text, {
  2. TextStyle? style,
  3. TextAlign? textAlign,
  4. int? maxLines,
  5. TextOverflow? overflow,
  6. double? autoSizeWidth,
  7. ColumnAutoSizeWidthBuilder? autoSizeWidthBuilder,
  8. Object? sortValue,
  9. Object? filterValue,
  10. TreeDataTableCellCallback? onTap,
  11. TreeDataTableCellCallback? onDoubleTap,
  12. TreeDataTableCellCallback? onSecondaryTap,
  13. TreeDataTableCellCallback? onHover,
})

Creates a text cell.

The displayed text is also used as the default sortValue and filterValue, which keeps sortable and filterable text columns concise. Supply explicit values when the displayed text should sort or filter by a different representation.

Implementation

TreeColumn.text(
  String text, {
  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(
        text,
        style: style,
        textAlign: textAlign,
        maxLines: maxLines,
        overflow: overflow,
      ),
      sortValue = sortValue ?? text,
      filterValue = filterValue ?? sortValue ?? text,
      assert(autoSizeWidth == null || (autoSizeWidth.isFinite && autoSizeWidth >= 0));