Table class
Grid table with optional borders and flex column widths.
Constructors
-
Table({List<
TableRow> children = const <TableRow>[], bool border = true, TableBorder? tableBorder, List<double> ? columnWidths, Map<int, TableColumnWidth> ? columnWidthSpec, double? defaultColumnWidth, TableColumnWidth defaultColumnWidthSpec = const FlexColumnWidth(), String borderColor = '90A4AE', TableCellVerticalAlignment defaultVerticalAlignment = TableCellVerticalAlignment.full}) -
Table API.
const
-
Table.fromTextArray({List<
String> ? headers, required List<List< data, bool border = true, TableBorder? tableBorder, List<String> >double> ? columnWidths, Map<int, TableColumnWidth> ? columnWidthSpec, TextStyle? headerStyle, TextStyle? cellStyle, TextStyle? oddCellStyle, AlignmentGeometry headerAlignment = Alignment.center, AlignmentGeometry cellAlignment = AlignmentDirectional.topStart, Map<int, AlignmentGeometry> ? cellAlignments, Map<int, AlignmentGeometry> ? headerAlignments, EdgeInsets cellPadding = const EdgeInsets.all(5), EdgeInsets? headerPadding, double cellHeight = 0, double? headerHeight, String? headerDecoration, String? headerCellDecoration, String? rowDecoration, String? oddRowDecoration, TableCellVerticalAlignment verticalAlignment = TableCellVerticalAlignment.full}) -
fromTextArray API — mirrors package:pdf
TableHelper.fromTextArray.factory
Properties
- border → bool
-
When true and tableBorder is null, draws a simple grid.
final
- borderColor → String
-
borderColor API.
final
-
children
→ List<
TableRow> -
children API.
final
-
columnWidths
→ List<
double> ? -
Flex weights, or point widths when any value is
> 10.final -
columnWidthSpec
→ Map<
int, TableColumnWidth> ? -
Per-column width strategies (package:pdf style). Takes precedence when set.
final
- defaultColumnWidth → double?
-
defaultColumnWidth API (legacy flex weight).
final
- defaultColumnWidthSpec → TableColumnWidth
-
Default strategy when columnWidthSpec omits a column.
final
- defaultVerticalAlignment → TableCellVerticalAlignment
-
defaultVerticalAlignment API.
final
-
flowChildren
→ List<
Widget> ? -
Children MultiPage should flow individually (vertical columns).
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tableBorder → TableBorder?
-
Rich border (overrides border / borderColor when non-null).
final
Methods
-
layout(
Context context, BoxConstraints constraints) → PwBox -
layout API.
override
-
layoutSpan(
Context context, BoxConstraints constraints) → SpanSlice? -
Splits a tall table across MultiPage pages, repeating
repeatheader rows.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paintStamp(
Context context, double pageW, double pageH) → void -
Stamp paint. The default lays out and paints glyph by glyph.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited