TSize class

Defines the unified size metrics and geometry for widgets such as TButton, TChip, and TBadge.

Annotations

Constructors

TSize({double minW = 0, double minH = 0, double hPad = 0, double vPad = 0, double font = 12, double icon = 16, double radius = 6, double spacing = 4})
Creates a custom TSize definition.
const
TSize.fromInputSize(TInputSize size)
Creates a size configuration from a TInputSize.
factory

Properties

borderRadius BorderRadius
no setter
font double
Font size for text.
final
fontSize double
no setter
hashCode int
The hash code for this object.
no setteroverride
height double
no setter
hPad double
Horizontal padding.
final
icon double
Primary icon size.
final
iconSize double
no setter
minH double
Minimum height of the element.
final
minimumSizeState WidgetStateProperty<Size>
no setter
minW double
Minimum width of the element.
final
padding EdgeInsets
no setter
paddingState WidgetStateProperty<EdgeInsets>
no setter
radius double
Corner border radius.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing double
Horizontal or vertical spacing between elements.
final
tilePaddingState WidgetStateProperty<EdgeInsets>
no setter
vPad double
Vertical padding.
final
width double
no setter

Methods

copyWith({double? minW, double? minH, double? hPad, double? vPad, double? font, double? icon, double? radius, double? spacing}) TSize
Creates a copy with updated metrics.
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.
override

Constants

block → const TSize
Full-width block size with medium height.
lg → const TSize
Large prominent size (minH: 45, font: 16, icon: 22).
md → const TSize
Medium standard size (minH: 38, font: 13, icon: 18).
sm → const TSize
Small size (minH: 32, font: 12, icon: 16).
xs → const TSize
Extra small size (minH: 28, font: 11, icon: 14).
xxs → const TSize
Extra extra small size (minH: 22, font: 10, icon: 12).
zero → const TSize
Zero size configuration.