DartStyle class

Typed CSS style object for Flint UI components.

Use this when you want Dart-friendly values that compile to inline CSS and scoped responsive or state styles.

Constructors

DartStyle({EdgeInsets? padding, EdgeInsets? margin, Object? width, Object? height, Object? minWidth, Object? maxWidth, Object? minHeight, Object? maxHeight, Display? display, Object? gap, AlignItems? alignItems, Object? justifyItems, JustifyContent? justifyContent, Object? flex, FlexDirection? flexDirection, Object? flexWrap, Object? flexGrow, Object? flexShrink, Object? flexBasis, Object? gridTemplateColumns, Position? position, Object? top, Object? right, Object? bottom, Object? left, int? zIndex, Object? overflow, Object? overflowX, Object? overflowY, Object? boxSizing, Object? scrollBehavior, Object? scrollbarDisplay, Object? aspectRatio, Object? objectFit, Object? transform, Object? backdropFilter, Object? maskImage, Object? fontFamily, Object? fontSize, Object? fontWeight, Object? lineHeight, Object? letterSpacing, Object? color, TextAlign? textAlign, Object? textTransform, Object? textDecoration, Object? textOverflow, Object? whiteSpace, Object? wordBreak, Object? overflowWrap, Object? cursor, Object? resize, Object? background, Object? radius, Border? border, Border? borderTop, Border? borderRight, Border? borderBottom, Border? borderLeft, Object? borderCollapse, Object? shadow, double? opacity, Object? gradient, Object? backgroundClip, Object? webkitBackgroundClip, Object? transition, Object? animation, Object? willChange, DartStyle? hover, DartStyle? focus, DartStyle? focusVisible, DartStyle? active, DartStyle? disabled, DartStyle? checked, DartStyle? selected, DartStyle? expanded, DartStyle? invalid, DartStyle? light, DartStyle? dark, DartStyle? sm, DartStyle? md, DartStyle? lg, DartStyle? xl})
Creates a typed style object.
const

Properties

active → DartStyle?
Scoped style applied for the CSS :active state.
final
alignItems → AlignItems?
CSS align-items value.
final
animation → Object?
CSS animation value.
final
aspectRatio → Object?
CSS aspect-ratio value.
final
backdropFilter → Object?
CSS backdrop-filter value.
final
background → Object?
CSS background value used when gradient is not set.
final
backgroundClip → Object?
CSS background-clip value.
final
border → Border?
CSS border shorthand value.
final
borderBottom → Border?
CSS border-bottom value.
final
borderCollapse → Object?
CSS border-collapse value.
final
borderLeft → Border?
CSS border-left value.
final
borderRight → Border?
CSS border-right value.
final
borderTop → Border?
CSS border-top value.
final
bottom → Object?
CSS bottom offset value.
final
boxSizing → Object?
CSS box-sizing value.
final
breakpointStyles → Map<Breakpoint, DartStyle>
Responsive styles keyed by their breakpoint.
no setter
checked → DartStyle?
Scoped style applied for the CSS :checked state.
final
color → Object?
CSS color value.
final
cursor → Object?
CSS cursor value.
final
dark → DartStyle?
Scoped style applied when the nearest Flint theme is dark.
final
disabled → DartStyle?
Scoped style applied for disabled controls and aria-disabled.
final
display → Display?
CSS display value.
final
expanded → DartStyle?
Scoped style applied when aria-expanded="true".
final
flex → Object?
CSS flex shorthand value.
final
flexBasis → Object?
CSS flex-basis value.
final
flexDirection → FlexDirection?
CSS flex-direction value.
final
flexGrow → Object?
CSS flex-grow value.
final
flexShrink → Object?
CSS flex-shrink value.
final
flexWrap → Object?
CSS flex-wrap value.
final
focus → DartStyle?
Scoped style applied for the CSS :focus state.
final
focusVisible → DartStyle?
Scoped style applied for the CSS :focus-visible state.
final
fontFamily → Object?
CSS font-family value.
final
fontSize → Object?
CSS font-size value.
final
fontWeight → Object?
CSS font-weight value.
final
gap → Object?
CSS gap value.
final
gradient → Object?
CSS background gradient value.
final
gridTemplateColumns → Object?
CSS grid-template-columns value.
final
hasBreakpoints → bool
Whether this style contains responsive breakpoint overrides.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasScopedStyles → bool
Whether this style contains any responsive or state overrides.
no setter
hasStateStyles → bool
Whether this style contains scoped state overrides.
no setter
height → Object?
CSS height value.
final
hover → DartStyle?
Scoped style applied for the CSS :hover state.
final
invalid → DartStyle?
Scoped style applied when aria-invalid="true".
final
justifyContent → JustifyContent?
CSS justify-content value.
final
justifyItems → Object?
CSS justify-items value.
final
left → Object?
CSS left offset value.
final
letterSpacing → Object?
CSS letter-spacing value.
final
lg → DartStyle?
Responsive style applied from the large breakpoint.
final
light → DartStyle?
Scoped style applied when the nearest Flint theme is light.
final
lineHeight → Object?
CSS line-height value.
final
margin → EdgeInsets?
CSS margin using typed edge inset values.
final
maskImage → Object?
CSS mask-image value.
final
maxHeight → Object?
CSS max-height value.
final
maxWidth → Object?
CSS max-width value.
final
md → DartStyle?
Responsive style applied from the medium breakpoint.
final
minHeight → Object?
CSS min-height value.
final
minWidth → Object?
CSS min-width value.
final
objectFit → Object?
CSS object-fit value for replaced elements such as images.
final
opacity → double?
CSS opacity value.
final
overflow → Object?
CSS overflow value.
final
overflowWrap → Object?
CSS overflow-wrap value.
final
overflowX → Object?
CSS overflow-x value.
final
overflowY → Object?
CSS overflow-y value.
final
padding → EdgeInsets?
CSS padding using typed edge inset values.
final
position → Position?
CSS position value.
final
radius → Object?
CSS border-radius value.
final
resize → Object?
CSS resize value.
final
CSS right offset value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollbarDisplay → Object?
CSS scrollbar visibility helper.
final
scrollBehavior → Object?
CSS scroll-behavior value.
final
selected → DartStyle?
Scoped style applied when aria-selected="true".
final
shadow → Object?
CSS box-shadow value.
final
sm → DartStyle?
Responsive style applied from the small breakpoint.
final
stateStyles → Map<String, DartStyle>
Scoped state styles keyed by CSS selector suffix.
no setter
textAlign → TextAlign?
CSS text-align value.
final
textDecoration → Object?
CSS text-decoration value.
final
textOverflow → Object?
CSS text-overflow value.
final
textTransform → Object?
CSS text-transform value.
final
themeStyles → Map<FlintThemeMode, DartStyle>
Theme-scoped styles keyed by Flint theme name.
no setter
top → Object?
CSS top offset value.
final
transform → Object?
CSS transform value.
final
transition → Object?
CSS transition value.
final
webkitBackgroundClip → Object?
CSS vendor-prefixed -webkit-background-clip value.
final
whiteSpace → Object?
CSS white-space value.
final
width → Object?
CSS width value.
final
willChange → Object?
CSS will-change value.
final
wordBreak → Object?
CSS word-break value.
final
xl → DartStyle?
Responsive style applied from the extra-large breakpoint.
final
zIndex → int?
CSS z-index value.
final

Methods

merge(DartStyle? override) → DartStyle
Returns a new style with non-null values from override applied.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, Object?>
Converts base style values to a CSS property map.
toString() → String
A string representation of this object.
inherited

Operators

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