ShadTable class
A customizable table widget for displaying tabular data.
Supports on-demand cell building, fixed lists of cells, headers, footers, and various interactions.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ShadTable
- Available extensions
Constructors
-
ShadTable({Key? key, required ShadTableCellBuilder builder, required int columnCount, required int rowCount, ShadTableCell header(BuildContext context, int column)?, TableSpanBuilder? columnBuilder, TableSpanBuilder? rowBuilder, TableSpanExtent? rowSpanExtent(int row)?, TableSpanExtent? columnSpanExtent(int column)?, TableSpanDecoration? rowSpanBackgroundDecoration(int row)?, TableSpanDecoration? rowSpanForegroundDecoration(int row)?, TableSpanDecoration? columnSpanBackgroundDecoration(int column)?, TableSpanDecoration? columnSpanForegroundDecoration(int column)?, ValueChanged<
int?> ? onHoveredRowIndex, ScrollController? horizontalScrollController, ScrollController? verticalScrollController, int? pinnedRowCount, int? pinnedColumnCount, bool? primary, DiagonalDragBehavior? diagonalDragBehavior, DragStartBehavior? dragStartBehavior, ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, ScrollPhysics? verticalScrollPhysics, ScrollPhysics? horizontalScrollPhysics, void onRowTap(int row)?, void onColumnTap(int column)?, Set<PointerDeviceKind> ? supportedDevices, void onRowTapDown(int row)?, void onRowTapUp(int row)?, void onRowTapCancel(int row)?, void onRowSecondaryTap(int row)?, void onRowSecondaryTapDown(int row)?, void onRowSecondaryTapUp(int row)?, void onRowSecondaryTapCancel(int row)?, void onColumnTapDown(int column)?, void onColumnTapUp(int column)?, void onColumnTapCancel(int column)?, void onColumnSecondaryTap(int column)?, void onColumnSecondaryTapDown(int column)?, void onColumnSecondaryTapUp(int column)?, void onColumnSecondaryTapCancel(int column)?}) -
Creates a ShadTable of widgets that are created on demand.
const
-
ShadTable.list({Key? key, required Iterable<
Iterable< children, Iterable<ShadTableCell> >ShadTableCell> ? header, TableSpanBuilder? columnBuilder, TableSpanBuilder? rowBuilder, TableSpanExtent? rowSpanExtent(int row)?, TableSpanExtent? columnSpanExtent(int column)?, TableSpanDecoration? rowSpanBackgroundDecoration(int row)?, TableSpanDecoration? rowSpanForegroundDecoration(int row)?, TableSpanDecoration? columnSpanBackgroundDecoration(int column)?, TableSpanDecoration? columnSpanForegroundDecoration(int column)?, ValueChanged<int?> ? onHoveredRowIndex, ScrollController? horizontalScrollController, ScrollController? verticalScrollController, int? pinnedRowCount, int? pinnedColumnCount, bool? primary, DiagonalDragBehavior? diagonalDragBehavior, DragStartBehavior? dragStartBehavior, ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, ScrollPhysics? verticalScrollPhysics, ScrollPhysics? horizontalScrollPhysics, void onRowTap(int row)?, void onColumnTap(int column)?, Set<PointerDeviceKind> ? supportedDevices, void onRowTapDown(int row)?, void onRowTapUp(int row)?, void onRowTapCancel(int row)?, void onRowSecondaryTap(int row)?, void onRowSecondaryTapDown(int row)?, void onRowSecondaryTapUp(int row)?, void onRowSecondaryTapCancel(int row)?, void onColumnTapDown(int column)?, void onColumnTapUp(int column)?, void onColumnTapCancel(int column)?, void onColumnSecondaryTap(int column)?, void onColumnSecondaryTapDown(int column)?, void onColumnSecondaryTapUp(int column)?, void onColumnSecondaryTapCancel(int column)?}) -
Creates a ShadTable from an explicit two dimensional array of
children.
Properties
- builder → ShadTableCellBuilder?
-
Builder function for creating table cells on demand.
final
-
children
→ Iterable<
Iterable< ?ShadTableCell> > -
Explicit 2D list of ShadTableCell widgets.
final
- columnBuilder → TableSpanBuilder?
-
Builder for defining column properties.
final
- columnCount → int
-
Number of columns in the table.
final
- columnSpanBackgroundDecoration → TableSpanDecoration? Function(int column)?
-
Function to define background decoration for columns.
final
- columnSpanExtent → TableSpanExtent? Function(int column)?
-
Function to define custom column span extents.
final
- columnSpanForegroundDecoration → TableSpanDecoration? Function(int column)?
-
Function to define foreground decoration for columns.
final
- diagonalDragBehavior → DiagonalDragBehavior?
-
Drag behavior when dragging diagonally.
final
- dragStartBehavior → DragStartBehavior?
-
Determines when a drag formally starts.
final
-
Explicit list of footer cells.
final
-
Builder function for creating footer cells.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
header
→ Iterable<
ShadTableCell> ? -
Explicit list of header cells.
final
- headerBuilder → ShadTableCell Function(BuildContext context, int column)?
-
Builder function for creating header cells.
final
- horizontalScrollController → ScrollController?
-
Controller for horizontal scrolling.
final
- horizontalScrollPhysics → ScrollPhysics?
-
Physics for horizontal scrolling.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardDismissBehavior → ScrollViewKeyboardDismissBehavior?
-
Configures how the keyboard is dismissed when a drag starts.
final
- onColumnSecondaryTap → void Function(int column)?
-
Callback for secondary tap gestures on a column.
final
- onColumnSecondaryTapCancel → void Function(int column)?
-
Callback for secondary tap cancel gestures on a column.
final
- onColumnSecondaryTapDown → void Function(int column)?
-
Callback for secondary tap down gestures on a column.
final
- onColumnSecondaryTapUp → void Function(int column)?
-
Callback for secondary tap up gestures on a column.
final
- onColumnTap → void Function(int column)?
-
Callback for tap gestures on a column.
final
- onColumnTapCancel → void Function(int column)?
-
Callback for tap cancel gestures on a column.
final
- onColumnTapDown → void Function(int column)?
-
Callback for tap down gestures on a column.
final
- onColumnTapUp → void Function(int column)?
-
Callback for tap up gestures on a column.
final
-
onHoveredRowIndex
→ ValueChanged<
int?> ? -
Callback for when a row is hovered, providing the row index.
final
- onRowSecondaryTap → void Function(int row)?
-
Callback for secondary tap gestures on a row.
final
- onRowSecondaryTapCancel → void Function(int row)?
-
Callback for secondary tap cancel gestures on a row.
final
- onRowSecondaryTapDown → void Function(int row)?
-
Callback for secondary tap down gestures on a row.
final
- onRowSecondaryTapUp → void Function(int row)?
-
Callback for secondary tap up gestures on a row.
final
- onRowTap → void Function(int row)?
-
Callback for tap gestures on a row.
final
- onRowTapCancel → void Function(int row)?
-
Callback for tap cancel gestures on a row.
final
- onRowTapDown → void Function(int row)?
-
Callback for tap down gestures on a row.
final
- onRowTapUp → void Function(int row)?
-
Callback for tap up gestures on a row.
final
- pinnedColumnCount → int?
-
Number of pinned columns at the start.
final
- pinnedRowCount → int?
-
Number of pinned rows at the top.
final
- primary → bool?
-
Whether this is the primary scroll view.
final
- rowBuilder → TableSpanBuilder?
-
Builder for defining row properties.
final
- rowCount → int
-
Number of rows in the table (excluding header and footer).
final
- rowSpanBackgroundDecoration → TableSpanDecoration? Function(int row)?
-
Function to define background decoration for rows.
final
- rowSpanExtent → TableSpanExtent? Function(int row)?
-
Function to define custom row span extents.
final
- rowSpanForegroundDecoration → TableSpanDecoration? Function(int row)?
-
Function to define foreground decoration for rows.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedDevices
→ Set<
PointerDeviceKind> ? -
The kind of devices that are allowed to be recognized.
final
- verticalScrollController → ScrollController?
-
Controller for vertical scrolling.
final
- verticalScrollPhysics → ScrollPhysics?
-
Physics for vertical scrolling.
final
Methods
-
animate(
{Key? key, List< Effect> ? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) → Animate -
Available on Widget, provided by the AnimateWidgetExtensions extension
Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex.myWidget.animate()is equivalent toAnimate(child: myWidget). -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ShadTable> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
positionedWith(
ShadPosition position) → Widget -
Available on Widget, provided by the PositionedExt extension
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited