TableStyle class

How a table is drawn.

Every field is optional. An unset field falls back to the theme, then to the value the package used before this style existed — so setting one field changes one thing and nothing else moves.

A style on the widget wins over the theme per field, not per object.

Annotations

Constructors

TableStyle({Color? borderColor, double? borderWidth, Radius? borderRadius, EdgeInsetsGeometry? cellPadding, Color? headerBackground, TextStyle? headerTextStyle, Color? rowStripeColor, TableColumnWidth? columnWidth, TableOverflow? overflow})
Creates a TableStyle. Null fields defer to the theme, then to the default.
const

Properties

borderColor → Color?
Grid colour. Defaults to ColorScheme.onSurface.
final
borderRadius → Radius?
Outer corner rounding. Defaults to square.
final
borderWidth → double?
Grid thickness. Defaults to 1.
final
cellPadding → EdgeInsetsGeometry?
Space inside a cell. Defaults to 8 by 4.
final
columnWidth → TableColumnWidth?
Optional width policy for every column. FixedColumnWidth skips content measurement and is useful for large streaming tables. Null preserves content-sized columns. Flex widths require a bounded table width.
final
hashCode → int
The hash code for this object.
no setteroverride
headerBackground → Color?
Header row fill. Defaults to surfaceContainerHighest.
final
headerTextStyle → TextStyle?
Header text style. Defaults to the body style.
final
overflow → TableOverflow?
What a table wider than the available width does. Defaults to TableOverflow.scroll.
final
rowStripeColor → Color?
Fill for alternating rows. Defaults to none.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({Color? borderColor, double? borderWidth, Radius? borderRadius, EdgeInsetsGeometry? cellPadding, Color? headerBackground, TextStyle? headerTextStyle, Color? rowStripeColor, TableColumnWidth? columnWidth, TableOverflow? overflow}) → TableStyle
A copy with the given fields replaced.
merge(TableStyle? other) → TableStyle
This style, with any unset field taken from other, field by field.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(ColorScheme scheme) → TableStyle
This style with every remaining default filled in.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

lerp(TableStyle? a, TableStyle? b, double t) → TableStyle?
Linearly interpolates between two styles.