TTableMobileCardTheme class
Theme configuration for TTableMobileCard.
TTableMobileCardTheme extends TKeyValueTheme to style the mobile card
view of table rows. It adds card-specific properties like:
- Margins/Padding
- Elevation
- Border Radius
- Background and Border colors (normal/selected)
- Inheritance
-
- Object
- TKeyValueTheme
- TTableMobileCardTheme
Constructors
-
TTableMobileCardTheme({EdgeInsets margin = const EdgeInsets.only(bottom: 4), EdgeInsets padding = const EdgeInsets.all(6), double elevation = 0, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(12)), required WidgetStateProperty<
Color> backgroundColor, required WidgetStateProperty<Border> border, TKeyValueMode? mode, required TextStyle keyStyle, required TextStyle labelStyle, required TextStyle valueStyle, double minGridColWidth = 110, bool forceKeyValue = false, double keyValueBreakPoint = 300, bool showLeftBorder = false, required Color borderColor, Alignment alignment = Alignment.topLeft, EdgeInsets narrowPadding = EdgeInsets.zero, double narrowItemBottomSpacing = 10, int narrowKeyFlex = 2, int narrowValueFlex = 3, double narrowGap = 12, EdgeInsets gridCellPadding = EdgeInsets.zero, double maxColWidthFraction = 0.7, double minFractionFixed = 1.0, double minFractionStructured = 0.9, double minFractionCompact = 0.80, double minFractionProse = 0.70, double additionalNaturalWidth = 15, int maxItemsPerRow = 12, bool gridInline = false, bool columnar = false, int? columns, double? inlineKeyWidth, double? inlineKeyMaxWidth, Alignment? inlineKeyAlignment = Alignment.topLeft, bool removeEmpty = true, bool selectable = false, double? hSpacing, double? vSpacing, double? gap}) -
Creates a mobile card theme.
const
- TTableMobileCardTheme.defaultTheme(ColorScheme colors)
-
factory
Properties
- additionalNaturalWidth → double
-
Extra width added to the calculated natural width of each child.
finalinherited
- alignment → Alignment
-
Default alignment for key-value content.
finalinherited
-
backgroundColor
→ WidgetStateProperty<
Color> -
final
-
border
→ WidgetStateProperty<
Border> -
final
- borderColor → Color
-
finalinherited
- borderRadius → BorderRadius
-
final
- columnar → bool
-
Whether to arrange items in a columnar grid.
When true (or when columns is set), items are arranged in uniform columns with aligned keys.
When false (default), items flow dynamically into rows based on natural widths.
finalinherited
- columns → int?
-
Fixed number of columns for grid layout.
When specified, items are distributed into a columnar grid of this width.
finalinherited
- elevation → double
-
final
- forceKeyValue → bool
-
Whether to force the key-value (narrow) layout regardless of screen width.
finalinherited
- gap → double
-
Spacing / gap between the key and value (vertical in stacked modes, horizontal in inline/split modes).
no setterinherited
- gridCellPadding → EdgeInsets
-
Padding surrounding each individual cell in grid layout.
finalinherited
- gridInline → bool
-
Whether to display key and value inline in grid layout (Key: Value).
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hSpacing → double
-
Horizontal spacing between cells/columns in grid layout.
no setterinherited
- inlineKeyAlignment → Alignment?
-
Alignment of the key within its column in inline grid layout.
finalinherited
- inlineKeyMaxWidth → double?
-
Maximum width allowed for key columns in inline grid layout.
finalinherited
- inlineKeyWidth → double?
-
Fixed width for key columns in inline grid layout.
finalinherited
- keyStyle → TextStyle
-
The style for keys/labels in key-value (narrow) layout.
finalinherited
- keyValueBreakPoint → double
-
The screen width threshold under which the key-value layout is used.
finalinherited
- labelStyle → TextStyle
-
The style for keys/labels in grid (wide) layout.
finalinherited
- margin → EdgeInsets
-
final
- maxColWidthFraction → double
-
The maximum fraction of total layout width a single column can consume.
finalinherited
- maxItemsPerRow → int
-
The maximum number of items allowed per row in grid layout.
finalinherited
- minFractionCompact → double
-
Minimum fraction of natural width tolerated by
compactcontent priority.finalinherited - minFractionFixed → double
-
Minimum fraction of natural width tolerated by
fixedcontent priority.finalinherited - minFractionProse → double
-
Minimum fraction of natural width tolerated by
prosecontent priority.finalinherited - minFractionStructured → double
-
Minimum fraction of natural width tolerated by
structuredcontent priority.finalinherited - minGridColWidth → double
-
The minimum allowed width for columns in grid layout.
finalinherited
- mode → TKeyValueMode?
-
Layout presentation mode for key-value items.
finalinherited
- narrowGap → double
-
Horizontal gap between the key and value columns in narrow key-value layout.
finalinherited
- narrowItemBottomSpacing → double
-
Vertical spacing between items in narrow key-value layout.
finalinherited
- narrowKeyFlex → int
-
Flex factor for the key column in narrow key-value layout.
finalinherited
- narrowPadding → EdgeInsets
-
Overall padding surrounding the narrow key-value layout container.
finalinherited
- narrowValueFlex → int
-
Flex factor for the value column in narrow key-value layout.
finalinherited
- padding → EdgeInsets
-
final
- rawGap → double?
-
The explicitly configured gap between key and value, or null if using mode-based default.
no setterinherited
- rawHSpacing → double?
-
The explicitly configured horizontal spacing, or null if using mode-based default.
no setterinherited
- rawVSpacing → double?
-
The explicitly configured vertical spacing, or null if using mode-based default.
no setterinherited
- removeEmpty → bool
-
Whether to remove optional/empty values (null, empty strings, 0, '-') by default.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectable → bool
-
Whether text values should be selectable with text selection gestures.
Defaults to false so parent card/container tap events work smoothly.
finalinherited
- showLeftBorder → bool
-
Whether to show a left vertical border/separator on grid cells.
finalinherited
- valueStyle → TextStyle
-
The style for text values.
finalinherited
- vSpacing → double
-
Vertical spacing between rows in grid layout.
no setterinherited
Methods
-
copyWith(
{TKeyValueMode? mode, EdgeInsets? margin, EdgeInsets? padding, double? elevation, BorderRadius? borderRadius, WidgetStateProperty< Color> ? backgroundColor, WidgetStateProperty<Border> ? border, TextStyle? keyStyle, TextStyle? labelStyle, TextStyle? valueStyle, double? minGridColWidth, bool? forceKeyValue, double? keyValueBreakPoint, bool? showLeftBorder, Color? borderColor, Alignment? alignment, EdgeInsets? narrowPadding, double? narrowItemBottomSpacing, int? narrowKeyFlex, int? narrowValueFlex, double? narrowGap, EdgeInsets? gridCellPadding, double? maxColWidthFraction, double? minFractionFixed, double? minFractionStructured, double? minFractionCompact, double? minFractionProse, double? additionalNaturalWidth, int? maxItemsPerRow, bool? gridInline, bool? columnar, int? columns, double? inlineKeyWidth, double? inlineKeyMaxWidth, Alignment? inlineKeyAlignment, bool? removeEmpty, bool? selectable, double? hSpacing, double? vSpacing, double? gap}) → TTableMobileCardTheme -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited