StacTable class

A Stac model representing Flutter's Table widget.

Displays its children in rows and columns. Configure column widths, borders, alignment, and text baseline.

{@tool snippet} Dart Example:

const StacTable(
  children: [
    StacTableRow(children: [
      StacText(data: 'A'),
      StacText(data: 'B'),
    ]),
    StacTableRow(children: [
      StacText(data: 'C'),
      StacText(data: 'D'),
    ]),
  ],
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "type": "table",
  "children": [
    {"children": [{"type": "text", "data": "A"}, {"type": "text", "data": "B"}]},
    {"children": [{"type": "text", "data": "C"}, {"type": "text", "data": "D"}]}
  ]
}

{@end-tool}

See Flutter docs: https://api.flutter.dev/flutter/widgets/Table-class.html

Inheritance
Available extensions
Annotations
  • @JsonSerializable.new()

Constructors

StacTable({List<StacTableRow> children = const <StacTableRow>[], Map<int, StacTableColumnWidth>? columnWidths, StacTableColumnWidth? defaultColumnWidth, StacTextDirection? textDirection, StacTableBorder? border, StacTableCellVerticalAlignment? defaultVerticalAlignment, StacTextBaseline? textBaseline})
Creates a table widget with the specified properties.
const
StacTable.fromJson(Map<String, dynamic> json)
Creates a StacTable from a JSON map.
factory

Properties

border → StacTableBorder?
Border drawn around and inside the table.
final
children → List<StacTableRow>
The table rows.
final
columnWidths → Map<int, StacTableColumnWidth>?
Per-column width configuration.
final
defaultColumnWidth → StacTableColumnWidth?
Default width configuration for columns without explicit config.
final
defaultVerticalAlignment → StacTableCellVerticalAlignment?
Default vertical alignment for cells.
final
hashCode → int
The hash code for this object.
no setterinherited
jsonData → Map<String, dynamic>?
Raw JSON data for this widget
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textBaseline → StacTextBaseline?
Text baseline used when aligning on baselines.
final
textDirection → StacTextDirection?
Text direction used to interpret start/end in the table.
final
type → String
Widget type identifier.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(BuildContext context) → Widget?

Available on StacWidget?, provided by the StacWidgetParser extension

parsePreferredSizeWidget(BuildContext context) → PreferredSizeWidget?

Available on StacWidget?, provided by the StacWidgetParser extension

toJson() → Map<String, dynamic>
Converts this StacTable instance to a JSON map.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited