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, required TextStyle keyStyle, required TextStyle labelStyle, required TextStyle valueStyle, double gridHorizontalSpacing = 0, double gridVerticalSpacing = 8, double minGridColWidth = 110, bool forceKeyValue = false, double keyValueBreakPoint = 300, bool showLeftBorder = false, required Color borderColor, Alignment alignment = Alignment.topLeft, EdgeInsets narrowPadding = const EdgeInsets.symmetric(vertical: 6), double narrowItemBottomSpacing = 10, int narrowKeyFlex = 2, int narrowValueFlex = 3, double narrowGap = 12, EdgeInsets gridCellPadding = const EdgeInsets.symmetric(horizontal: 6, vertical: 6), double gridCellGap = 4, 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, double inlineKeyGap = 8, Alignment? inlineKeyAlignment = Alignment.topLeft}) -
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
- gridCellGap → double
-
Vertical spacing between the label and value within a grid cell.
finalinherited
- gridCellPadding → EdgeInsets
-
Padding surrounding each individual cell in grid layout.
finalinherited
- gridHorizontalSpacing → double
-
Horizontal spacing between cells/columns in grid layout.
finalinherited
- gridInline → bool
-
Whether to display key and value inline in grid layout (Key: Value).
finalinherited
- gridVerticalSpacing → double
-
Vertical spacing between rows in grid layout.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- inlineKeyAlignment → Alignment?
-
Alignment of the key within its column in inline grid layout.
finalinherited
- inlineKeyGap → double
-
Horizontal gap between the key and value 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
- 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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLeftBorder → bool
-
Whether to show a left vertical border/separator on grid cells.
finalinherited
- valueStyle → TextStyle
-
The style for text values.
finalinherited
Methods
-
copyWith(
{EdgeInsets? margin, EdgeInsets? padding, double? elevation, BorderRadius? borderRadius, WidgetStateProperty< Color> ? backgroundColor, WidgetStateProperty<Border> ? border, TextStyle? keyStyle, TextStyle? labelStyle, TextStyle? valueStyle, double? gridHorizontalSpacing, double? gridVerticalSpacing, 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? gridCellGap, double? maxColWidthFraction, double? minFractionFixed, double? minFractionStructured, double? minFractionCompact, double? minFractionProse, double? additionalNaturalWidth, int? maxItemsPerRow, bool? gridInline, bool? columnar, int? columns, double? inlineKeyWidth, double? inlineKeyMaxWidth, double? inlineKeyGap, Alignment? inlineKeyAlignment}) → 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