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, String? gridTemplateColumns, Position? position, Object? top, Object? right, Object? bottom, Object? left, int? zIndex, Object? overflow, Object? boxSizing, Object? scrollBehavior, Object? aspectRatio, Object? objectFit, Object? transform, Object? backdropFilter, Object? fontFamily, Object? fontSize, Object? fontWeight, Object? lineHeight, Object? color, TextAlign? textAlign, Object? textTransform, Object? textDecoration, Object? cursor, Object? resize, Object? background, Object? radius, Border? border, Border? borderTop, Border? borderRight, Border? borderBottom, Border? borderLeft, Object? shadow, double? opacity, Object? gradient, 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? sm, DartStyle? md, DartStyle? lg, DartStyle? xl})
-
Creates a typed style object.
const
Properties
- active → DartStyle?
-
Scoped style applied for the CSS
:activestate.final - alignItems → AlignItems?
-
CSS
align-itemsvalue.final - animation → Object?
-
CSS
animationvalue.final - aspectRatio → Object?
-
CSS
aspect-ratiovalue.final - backdropFilter → Object?
-
CSS
backdrop-filtervalue.final - background → Object?
-
CSS
backgroundvalue used when gradient is not set.final - border → Border?
-
CSS
bordershorthand value.final - borderBottom → Border?
-
CSS
border-bottomvalue.final - borderLeft → Border?
-
CSS
border-leftvalue.final - borderRight → Border?
-
CSS
border-rightvalue.final - borderTop → Border?
-
CSS
border-topvalue.final - bottom → Object?
-
CSS
bottomoffset value.final - boxSizing → Object?
-
CSS
box-sizingvalue.final -
breakpointStyles
→ Map<
Breakpoint, DartStyle> -
Responsive styles keyed by their breakpoint.
no setter
- checked → DartStyle?
-
Scoped style applied for the CSS
:checkedstate.final - color → Object?
-
CSS
colorvalue.final - cursor → Object?
-
CSS
cursorvalue.final - disabled → DartStyle?
-
Scoped style applied for disabled controls and
aria-disabled.final - display → Display?
-
CSS
displayvalue.final - expanded → DartStyle?
-
Scoped style applied when
aria-expanded="true".final - flex → Object?
-
CSS
flexshorthand value.final - flexBasis → Object?
-
CSS
flex-basisvalue.final - flexDirection → FlexDirection?
-
CSS
flex-directionvalue.final - flexGrow → Object?
-
CSS
flex-growvalue.final - flexShrink → Object?
-
CSS
flex-shrinkvalue.final - flexWrap → Object?
-
CSS
flex-wrapvalue.final - focus → DartStyle?
-
Scoped style applied for the CSS
:focusstate.final - focusVisible → DartStyle?
-
Scoped style applied for the CSS
:focus-visiblestate.final - fontFamily → Object?
-
CSS
font-familyvalue.final - fontSize → Object?
-
CSS
font-sizevalue.final - fontWeight → Object?
-
CSS
font-weightvalue.final - gap → Object?
-
CSS
gapvalue.final - gradient → Object?
-
CSS background gradient value.
final
- gridTemplateColumns → String?
-
CSS
grid-template-columnsvalue.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
heightvalue.final - hover → DartStyle?
-
Scoped style applied for the CSS
:hoverstate.final - invalid → DartStyle?
-
Scoped style applied when
aria-invalid="true".final - justifyContent → JustifyContent?
-
CSS
justify-contentvalue.final - justifyItems → Object?
-
CSS
justify-itemsvalue.final - left → Object?
-
CSS
leftoffset value.final - lg → DartStyle?
-
Responsive style applied from the large breakpoint.
final
- lineHeight → Object?
-
CSS
line-heightvalue.final - margin → EdgeInsets?
-
CSS
marginusing typed edge inset values.final - maxHeight → Object?
-
CSS
max-heightvalue.final - maxWidth → Object?
-
CSS
max-widthvalue.final - md → DartStyle?
-
Responsive style applied from the medium breakpoint.
final
- minHeight → Object?
-
CSS
min-heightvalue.final - minWidth → Object?
-
CSS
min-widthvalue.final - objectFit → Object?
-
CSS
object-fitvalue for replaced elements such as images.final - opacity → double?
-
CSS
opacityvalue.final - overflow → Object?
-
CSS
overflowvalue.final - padding → EdgeInsets?
-
CSS
paddingusing typed edge inset values.final - position → Position?
-
CSS
positionvalue.final - radius → Object?
-
CSS
border-radiusvalue.final - resize → Object?
-
CSS
resizevalue.final - right → Object?
-
CSS
rightoffset value.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollBehavior → Object?
-
CSS
scroll-behaviorvalue.final - selected → DartStyle?
-
Scoped style applied when
aria-selected="true".final - shadow → Object?
-
CSS
box-shadowvalue.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-alignvalue.final - textDecoration → Object?
-
CSS
text-decorationvalue.final - textTransform → Object?
-
CSS
text-transformvalue.final - top → Object?
-
CSS
topoffset value.final - transform → Object?
-
CSS
transformvalue.final - transition → Object?
-
CSS
transitionvalue.final - width → Object?
-
CSS
widthvalue.final - willChange → Object?
-
CSS
will-changevalue.final - xl → DartStyle?
-
Responsive style applied from the extra-large breakpoint.
final
- zIndex → int?
-
CSS
z-indexvalue.final
Methods
-
merge(
DartStyle? override) → DartStyle -
Returns a new style with non-null values from
overrideapplied. -
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