MoonTable constructor
const
MoonTable({
- Key? key,
- double? width,
- bool isHeaderPinned = true,
- bool isRowsPlaceholderPinned = true,
- bool sortAscending = false,
- int sortColumnIndex = 0,
- required int columnsCount,
- Decoration? decoration,
- double? rowGap,
- double? height,
- EdgeInsetsGeometry? cellPadding,
- EdgeInsetsGeometry? tablePadding,
- MoonTableRowSize? rowSize,
- ScrollBehavior? scrollBehaviour,
- ScrollPhysics? verticalScrollPhysics,
- ScrollPhysics? horizontalScrollPhysics,
- String? semanticLabel,
- OnScrollControllersReady? onScrollControllersReady,
- MoonTableHeader? header,
- required List<
MoonTableRow> rows, - Widget? rowsPlaceholder,
- Widget? rowDivider,
- 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');