HeaderColumn constructor
HeaderColumn({
- required Widget widget,
- required String textVisibilityDialog,
- ColumnAutoSize? autoSize = const ColumnAutoSize(),
- double? autoSizeWidth,
- ColumnAutoSizeWidthBuilder? autoSizeWidthBuilder,
- double? width,
- double? minimumWidth,
- double? maximumWidth,
- double? flex,
- int height = 55,
- bool visible = true,
- bool resizable = true,
- int? combinedColumns,
- bool pinLeft = false,
- bool pinRight = false,
- bool canHide = true,
- bool sortable = false,
- bool filterable = false,
- TreeDataTableColumnFilterType filterType = TreeDataTableColumnFilterType.text,
- bool reorderable = true,
- TreeDataTableSortComparator? sortComparator,
Creates a new instance of HeaderColumn
Implementation
HeaderColumn({
required this.widget,
required this.textVisibilityDialog,
this.autoSize = const ColumnAutoSize(),
this.autoSizeWidth,
this.autoSizeWidthBuilder,
this.width,
this.minimumWidth,
this.maximumWidth,
this.flex,
this.height = 55,
this.visible = true,
this.resizable = true,
this.combinedColumns,
this.pinLeft = false,
this.pinRight = false,
this.canHide = true,
this.sortable = false,
this.filterable = false,
this.filterType = TreeDataTableColumnFilterType.text,
this.reorderable = true,
this.sortComparator,
}) : assert(!(pinLeft && pinRight), 'pinLeft and pinRight cannot both be true'),
assert(autoSizeWidth == null || (autoSizeWidth.isFinite && autoSizeWidth >= 0)),
assert(width == null || (width.isFinite && width > 0), 'width must be finite and greater than zero'),
assert(flex == null || (flex.isFinite && flex > 0), 'flex must be finite and greater than zero'),
assert(minimumWidth == null || (minimumWidth.isFinite && minimumWidth >= 0),
'minimumWidth must be finite and non-negative'),
assert(maximumWidth == null || (!maximumWidth.isNaN && maximumWidth > 0),
'maximumWidth must be greater than zero'),
assert(height > 0, 'height must be greater than zero'),
assert(combinedColumns == null || combinedColumns > 0, 'combinedColumns must be greater than zero'),
assert(width == null || minimumWidth == null || width >= minimumWidth,
'width cannot be smaller than minimumWidth'),
assert(
width == null || maximumWidth == null || width <= maximumWidth,
'width cannot be greater than maximumWidth',
),
assert(
minimumWidth == null || maximumWidth == null || maximumWidth >= minimumWidth,
'maximumWidth cannot be smaller than minimumWidth',
),
assert(
width != null || flex != null,
'Either width or flex must be provided',
);