Styles class abstract
Represents a set of css styles by pairs of property and value.
- Mixed-in types
Constructors
-
Styles.new({String? content, Display? display, Position? position, ZIndex? zIndex, Unit? width, Unit? height, Unit? minWidth, Unit? minHeight, Unit? maxWidth, Unit? maxHeight, Padding? padding, Margin? margin, BoxSizing? boxSizing, Border? border, BorderRadius? radius, Outline? outline, double? opacity, Visibility? visibility, Overflow? overflow, BoxShadow? shadow, Cursor? cursor, UserSelect? userSelect, PointerEvents? pointerEvents, Transition? transition, Transform? transform, FlexDirection? flexDirection, FlexWrap? flexWrap, JustifyContent? justifyContent, AlignItems? alignItems, GridTemplate? gridTemplate, List<
TrackSize> ? autoRows, List<TrackSize> ? autoColumns, Gap? gap, Flex? flex, int? order, AlignSelf? alignSelf, GridPlacement? gridPlacement, ListStyle? listStyle, ImageStyle? listImage, ListStylePosition? listPosition, Color? color, TextAlign? textAlign, FontFamily? fontFamily, Unit? fontSize, FontWeight? fontWeight, FontStyle? fontStyle, TextDecoration? textDecoration, TextTransform? textTransform, Unit? textIndent, Unit? letterSpacing, Unit? wordSpacing, Unit? lineHeight, TextShadow? textShadow, TextOverflow? textOverflow, WhiteSpace? whiteSpace, Color? backgroundColor, ImageStyle? backgroundImage, BackgroundOrigin? backgroundOrigin, BackgroundPosition? backgroundPosition, BackgroundAttachment? backgroundAttachment, BackgroundRepeat? backgroundRepeat, BackgroundSize? backgroundSize, BackgroundClip? backgroundClip, Map<String, String> ? raw}) -
Constructs an empty Styles instance.
constfactory
- 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.
constfactory
- 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, ZIndex? zIndex, double? opacity, Transform? transform, BoxShadow? shadow, Cursor? cursor, Transition? transition})
-
Constructs a Styles instance for common box style properties.
constfactory
-
Styles.combine(List<
Styles> styles) -
Constructs a Styles instance by combining multiple other Styles instances.
constfactory
- Styles.flexbox({FlexDirection? direction, FlexWrap? wrap, JustifyContent? justifyContent, AlignItems? alignItems, Gap? gap})
-
Constructs a Styles instance for common flexbox style properties.
constfactory
- Styles.flexItem({Flex? flex, int? order, AlignSelf? alignSelf})
-
Constructs a Styles instance for children of a flex-box parent.
constfactory
-
Styles.grid({GridTemplate? template, Gap? gap, List<
TrackSize> ? autoRows, List<TrackSize> ? autoColumns}) -
Constructs a Styles instance for common grid style properties.
constfactory
- Styles.gridItem({GridPlacement? placement})
-
Constructs a Styles instance for children of a grid parent.
constfactory
- Styles.list({ListStyle? style, ImageStyle? image, ListStylePosition? position})
-
Constructs a Styles instance for a list.
constfactory
-
Styles.raw(Map<
String, String> styles) -
Constructs a Styles instance from a Map of raw css style properties and values.
constfactory
- 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.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
properties
→ Map<
String, String> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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, Gap? gap}) → 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, Gap? 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
-
list(
{ListStyle? style, ImageStyle? image, ListStylePosition? position}) → Styles -
Combines the current styles with common list style 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
-
styles(
{String? content, Display? display, Position? position, ZIndex? zIndex, Unit? width, Unit? height, Unit? minWidth, Unit? minHeight, Unit? maxWidth, Unit? maxHeight, Padding? padding, Margin? margin, BoxSizing? boxSizing, Border? border, BorderRadius? radius, Outline? outline, double? opacity, Visibility? visibility, Overflow? overflow, BoxShadow? shadow, Cursor? cursor, UserSelect? userSelect, PointerEvents? pointerEvents, Transition? transition, Transform? transform, FlexDirection? flexDirection, FlexWrap? flexWrap, JustifyContent? justifyContent, AlignItems? alignItems, GridTemplate? gridTemplate, List< TrackSize> ? autoRows, List<TrackSize> ? autoColumns, Gap? gap, Flex? flex, int? order, AlignSelf? alignSelf, GridPlacement? gridPlacement, ListStyle? listStyle, ImageStyle? listImage, ListStylePosition? listPosition, Color? color, TextAlign? textAlign, FontFamily? fontFamily, Unit? fontSize, FontWeight? fontWeight, FontStyle? fontStyle, TextDecoration? textDecoration, TextTransform? textTransform, Unit? textIndent, Unit? letterSpacing, Unit? wordSpacing, Unit? lineHeight, TextShadow? textShadow, TextOverflow? textOverflow, WhiteSpace? whiteSpace, Color? backgroundColor, ImageStyle? backgroundImage, BackgroundOrigin? backgroundOrigin, BackgroundPosition? backgroundPosition, BackgroundAttachment? backgroundAttachment, BackgroundRepeat? backgroundRepeat, BackgroundSize? backgroundSize, BackgroundClip? backgroundClip, Map<String, String> ? raw}) → Styles -
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