ShadTable.list constructor

ShadTable.list({
  1. Key? key,
  2. required Iterable<Iterable<ShadTableCell>> children,
  3. Iterable<ShadTableCell>? header,
  4. Iterable<ShadTableCell>? footer,
  5. TableSpanBuilder? columnBuilder,
  6. TableSpanBuilder? rowBuilder,
  7. TableSpanExtent? rowSpanExtent(
    1. int row
    )?,
  8. TableSpanExtent? columnSpanExtent(
    1. int row
    )?,
  9. TableSpanDecoration? rowSpanBackgroundDecoration(
    1. int row
    )?,
  10. TableSpanDecoration? rowSpanForegroundDecoration(
    1. int row
    )?,
  11. TableSpanDecoration? columnSpanBackgroundDecoration(
    1. int row
    )?,
  12. TableSpanDecoration? columnSpanForegroundDecoration(
    1. int row
    )?,
  13. ValueChanged<int?>? onHoveredRowIndex,
  14. ScrollController? horizontalScrollController,
  15. ScrollController? verticalScrollController,
  16. int? pinnedRowCount,
  17. int? pinnedColumnCount,
  18. bool? primary,
  19. DiagonalDragBehavior? diagonalDragBehavior,
  20. DragStartBehavior? dragStartBehavior,
  21. ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
  22. ScrollPhysics? verticalScrollPhysics,
  23. ScrollPhysics? horizontalScrollPhysics,
  24. void onRowTap(
    1. int row
    )?,
  25. void onColumnTap(
    1. int row
    )?,
  26. Set<PointerDeviceKind>? supportedDevices,
  27. void onRowTapDown(
    1. int row
    )?,
  28. void onRowTapUp(
    1. int row
    )?,
  29. void onRowTapCancel(
    1. int row
    )?,
  30. void onRowSecondaryTap(
    1. int row
    )?,
  31. void onRowSecondaryTapDown(
    1. int row
    )?,
  32. void onRowSecondaryTapUp(
    1. int row
    )?,
  33. void onRowSecondaryTapCancel(
    1. int row
    )?,
  34. void onColumnTapDown(
    1. int row
    )?,
  35. void onColumnTapUp(
    1. int row
    )?,
  36. void onColumnTapCancel(
    1. int row
    )?,
  37. void onColumnSecondaryTap(
    1. int row
    )?,
  38. void onColumnSecondaryTapDown(
    1. int row
    )?,
  39. void onColumnSecondaryTapUp(
    1. int row
    )?,
  40. void onColumnSecondaryTapCancel(
    1. int row
    )?,
})

Creates a ShadTable from an explicit two dimensional array of children.

This constructor is appropriate for list views with a small number of children because constructing the List requires doing work for every child that could possibly be displayed in the list view instead of just those children that are actually visible.

Implementation

ShadTable.list({
  super.key,
  required Iterable<Iterable<ShadTableCell>> this.children,
  this.header,
  this.footer,
  this.columnBuilder,
  this.rowBuilder,
  this.rowSpanExtent,
  this.columnSpanExtent,
  this.rowSpanBackgroundDecoration,
  this.rowSpanForegroundDecoration,
  this.columnSpanBackgroundDecoration,
  this.columnSpanForegroundDecoration,
  this.onHoveredRowIndex,
  this.horizontalScrollController,
  this.verticalScrollController,
  this.pinnedRowCount,
  this.pinnedColumnCount,
  this.primary,
  this.diagonalDragBehavior,
  this.dragStartBehavior,
  this.keyboardDismissBehavior,
  this.verticalScrollPhysics,
  this.horizontalScrollPhysics,
  this.onRowTap,
  this.onColumnTap,
  this.supportedDevices,
  this.onRowTapDown,
  this.onRowTapUp,
  this.onRowTapCancel,
  this.onRowSecondaryTap,
  this.onRowSecondaryTapDown,
  this.onRowSecondaryTapUp,
  this.onRowSecondaryTapCancel,
  this.onColumnTapDown,
  this.onColumnTapUp,
  this.onColumnTapCancel,
  this.onColumnSecondaryTap,
  this.onColumnSecondaryTapDown,
  this.onColumnSecondaryTapUp,
  this.onColumnSecondaryTapCancel,
}) : builder = null,
     assert(children.isNotEmpty, 'children cannot be empty'),
     headerBuilder = null,
     footerBuilder = null,
     columnCount = children.elementAt(0).length,
     rowCount = children.length;