Styles class abstract

Represents a set of css styles by pairs of property and value.

Mixed in types

Constructors

Styles()
Constructs an empty Styles instance.
const
factory
Styles.background({Color? color, BackgroundAttachment? attachment, BackgroundClip? clip, ImageStyle? image, BackgroundOrigin? origin, BackgroundPosition? position, BackgroundRepeat? repeat, BackgroundSize? size})
Constructs a Styles instance for common background style properties.
const
factory
Styles.box({EdgeInsets? padding, EdgeInsets? margin, Display? display, BoxSizing? boxSizing, Unit? width, Unit? height, Unit? minWidth, Unit? maxWidth, Unit? minHeight, Unit? maxHeight, Border? border, BorderRadius? radius, Outline? outline, Overflow? overflow, Visibility? visibility, Position? position, double? opacity, Transform? transform, BoxShadow? shadow, Cursor? cursor, Transition? transition})
Constructs a Styles instance for common box style properties.
const
factory
Styles.combine(List<Styles> styles)
Constructs a Styles instance by combining multiple other Styles instances.
const
factory
Styles.flexbox({FlexDirection? direction, FlexWrap? wrap, JustifyContent? justifyContent, AlignItems? alignItems})
Constructs a Styles instance for common flexbox style properties.
const
factory
Styles.flexItem({Flex? flex, int? order, AlignSelf? alignSelf})
Constructs a Styles instance for children of a flex-box parent.
const
factory
Styles.grid({GridTemplate? template, GridGap? gap, List<TrackSize>? autoRows, List<TrackSize>? autoColumns})
Constructs a Styles instance for common grid style properties.
const
factory
Styles.gridItem({GridPlacement? placement})
Constructs a Styles instance for children of a grid parent.
const
factory
Styles.raw(Map<String, String> styles)
Constructs a Styles instance from a Map of raw css style properties and values.
const
factory
Styles.text({Color? color, TextAlign? align, FontFamily? fontFamily, FontStyle? fontStyle, Unit? fontSize, FontWeight? fontWeight, TextDecoration? decoration, TextTransform? transform, Unit? indent, Unit? letterSpacing, Unit? wordSpacing, Unit? lineHeight, TextShadow? shadow, TextOverflow? overflow, WhiteSpace? whiteSpace})
Constructs a Styles instance for common text-related style properties.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
styles Map<String, String>
no setter

Methods

background({Color? color, BackgroundAttachment? attachment, BackgroundClip? clip, ImageStyle? image, BackgroundOrigin? origin, BackgroundPosition? position, BackgroundRepeat? repeat, BackgroundSize? size}) Styles
Combines the current styles with common background style properties.
inherited
box({EdgeInsets? padding, EdgeInsets? margin, Display? display, BoxSizing? boxSizing, Unit? width, Unit? height, Unit? minWidth, Unit? maxWidth, Unit? minHeight, Unit? maxHeight, Border? border, BorderRadius? radius, Outline? outline, Overflow? overflow, Visibility? visibility, Position? position, double? opacity, Transform? transform, BoxShadow? shadow, Cursor? cursor, Transition? transition}) Styles
Combines the current styles with common box style properties.
inherited
combine(Styles styles) Styles
Combines the current styles with another Styles instances.
override
flexbox({FlexDirection? direction, FlexWrap? wrap, JustifyContent? justifyContent, AlignItems? alignItems}) Styles
Combines the current styles with common flexbox style properties.
inherited
flexItem({Flex? flex, int? order, AlignSelf? alignSelf}) Styles
Combines the current styles with common flex child properties.
inherited
grid({GridTemplate? template, GridGap? gap, List<TrackSize>? autoRows, List<TrackSize>? autoColumns}) Styles
Combines the current styles with common grid style properties.
inherited
gridItem({GridPlacement? placement}) Styles
Combines the current styles with common grid child properties.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
raw(Map<String, String> styles) Styles
Combines the current styles with a Map of raw css style properties and values.
inherited
text({Color? color, TextAlign? align, FontFamily? fontFamily, FontStyle? fontStyle, Unit? fontSize, FontWeight? fontWeight, TextDecoration? decoration, TextTransform? transform, Unit? indent, Unit? letterSpacing, Unit? wordSpacing, Unit? lineHeight, TextShadow? shadow, TextOverflow? overflow, WhiteSpace? whiteSpace}) Styles
Combines the current styles with common text-related style properties.
inherited
toString() String
A string representation of this object.
inherited

Operators

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