MoonTable constructor

const MoonTable({
  1. Key? key,
  2. double? width,
  3. bool isHeaderPinned = true,
  4. bool isFooterPinned = true,
  5. bool isRowsPlaceholderPinned = true,
  6. bool sortAscending = false,
  7. int sortColumnIndex = 0,
  8. required int columnsCount,
  9. Decoration? decoration,
  10. double? rowGap,
  11. double? height,
  12. EdgeInsetsGeometry? cellPadding,
  13. EdgeInsetsGeometry? tablePadding,
  14. MoonTableRowSize? rowSize,
  15. ScrollBehavior? scrollBehaviour,
  16. ScrollPhysics? verticalScrollPhysics,
  17. ScrollPhysics? horizontalScrollPhysics,
  18. String? semanticLabel,
  19. OnScrollControllersReady? onScrollControllersReady,
  20. MoonTableHeader? header,
  21. MoonTableFooter? footer,
  22. required List<MoonTableRow> rows,
  23. Widget? rowsPlaceholder,
  24. Widget? rowDivider,
  25. Widget? loadingIndicator,
})

Creates a Moon Design table.

Implementation

const MoonTable({
  super.key,
  this.width,
  this.isHeaderPinned = true,
  this.isFooterPinned = true,
  this.isRowsPlaceholderPinned = true,
  this.sortAscending = false,
  this.sortColumnIndex = 0,
  required this.columnsCount,
  this.decoration,
  this.rowGap,
  this.height,
  this.cellPadding,
  this.tablePadding,
  this.rowSize,
  this.scrollBehaviour,
  this.verticalScrollPhysics,
  this.horizontalScrollPhysics,
  this.semanticLabel,
  this.onScrollControllersReady,
  this.header,
  this.footer,
  required this.rows,
  this.rowsPlaceholder,
  this.rowDivider,
  this.loadingIndicator,
})  : assert(height == null || height > 0, 'Table height can only be null or > 0.'),
      assert(sortColumnIndex >= 0, 'SortColumnIndex can only be >= 0.'),
      assert(columnsCount > 0, 'Columns count must be > 0');