HeaderColumn constructor

HeaderColumn({
  1. required Widget widget,
  2. required String textVisibilityDialog,
  3. ColumnAutoSize? autoSize = const ColumnAutoSize(),
  4. double? autoSizeWidth,
  5. ColumnAutoSizeWidthBuilder? autoSizeWidthBuilder,
  6. double? width,
  7. double? minimumWidth,
  8. double? maximumWidth,
  9. double? flex,
  10. int height = 55,
  11. bool visible = true,
  12. bool resizable = true,
  13. int? combinedColumns,
  14. bool pinLeft = false,
  15. bool pinRight = false,
  16. bool canHide = true,
  17. bool sortable = false,
  18. bool filterable = false,
  19. TreeDataTableColumnFilterType filterType = TreeDataTableColumnFilterType.text,
  20. bool reorderable = true,
  21. 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',
      );