Style class

This class represents all the available CSS attributes for this package.

Constructors

Style({Color? backgroundColor = Colors.transparent, Color? color, TextDirection? direction, Display? display, String? fontFamily, List<FontFeature>? fontFeatureSettings, FontSize? fontSize, FontStyle? fontStyle, FontWeight? fontWeight, double? height, LineHeight? lineHeight, double? letterSpacing, ListStyleType? listStyleType, ListStylePosition? listStylePosition, EdgeInsets? padding, EdgeInsets? margin, TextAlign? textAlign, TextDecoration? textDecoration, Color? textDecorationColor, TextDecorationStyle? textDecorationStyle, double? textDecorationThickness, List<Shadow>? textShadow, VerticalAlign? verticalAlign, WhiteSpace? whiteSpace, double? width, double? wordSpacing, String? before, String? after, Border? border, Alignment? alignment, Widget? markerContent, int? maxLines, TextOverflow? textOverflow, TextTransform? textTransform = TextTransform.none})
Style.fromTextStyle(TextStyle textStyle)

Properties

after String?
getter/setter pair
alignment Alignment?
getter/setter pair
backgroundColor Color?
CSS attribute "background-color"
getter/setter pair
before String?
getter/setter pair
border Border?
getter/setter pair
color Color?
CSS attribute "color"
getter/setter pair
direction TextDirection?
CSS attribute "direction"
getter/setter pair
display Display?
CSS attribute "display"
getter/setter pair
fontFamily String?
CSS attribute "font-family"
getter/setter pair
fontFeatureSettings List<FontFeature>?
CSS attribute "font-feature-settings"
getter/setter pair
fontSize FontSize?
CSS attribute "font-size"
getter/setter pair
fontStyle FontStyle?
CSS attribute "font-style"
getter/setter pair
fontWeight FontWeight?
CSS attribute "font-weight"
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height double?
CSS attribute "height"
getter/setter pair
letterSpacing double?
CSS attribute "letter-spacing"
getter/setter pair
lineHeight LineHeight?
CSS attribute "line-height"
getter/setter pair
listStylePosition ListStylePosition?
CSS attribute "list-style-position"
getter/setter pair
listStyleType ListStyleType?
CSS attribute "list-style-type"
getter/setter pair
margin EdgeInsets?
CSS attribute "margin"
getter/setter pair
markerContent Widget?
getter/setter pair
maxLines int?
MaxLine
getter/setter pair
padding EdgeInsets?
CSS attribute "padding"
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textAlign TextAlign?
CSS attribute "text-align"
getter/setter pair
textDecoration TextDecoration?
CSS attribute "text-decoration"
getter/setter pair
textDecorationColor Color?
CSS attribute "text-decoration-color"
getter/setter pair
textDecorationStyle TextDecorationStyle?
CSS attribute "text-decoration-style"
getter/setter pair
textDecorationThickness double?
Loosely based on CSS attribute "text-decoration-thickness"
getter/setter pair
textOverflow TextOverflow?
TextOverflow
getter/setter pair
textShadow List<Shadow>?
CSS attribute "text-shadow"
getter/setter pair
textTransform TextTransform?
getter/setter pair
verticalAlign VerticalAlign?
CSS attribute "vertical-align"
getter/setter pair
whiteSpace WhiteSpace?
CSS attribute "white-space"
getter/setter pair
width double?
CSS attribute "width"
getter/setter pair
wordSpacing double?
CSS attribute "word-spacing"
getter/setter pair

Methods

copyOnlyInherited(Style child) Style
copyWith({Color? backgroundColor, Color? color, TextDirection? direction, Display? display, String? fontFamily, List<FontFeature>? fontFeatureSettings, FontSize? fontSize, FontStyle? fontStyle, FontWeight? fontWeight, double? height, LineHeight? lineHeight, double? letterSpacing, ListStyleType? listStyleType, ListStylePosition? listStylePosition, EdgeInsets? padding, EdgeInsets? margin, TextAlign? textAlign, TextDecoration? textDecoration, Color? textDecorationColor, TextDecorationStyle? textDecorationStyle, double? textDecorationThickness, List<Shadow>? textShadow, VerticalAlign? verticalAlign, WhiteSpace? whiteSpace, double? width, double? wordSpacing, String? before, String? after, Border? border, Alignment? alignment, Widget? markerContent, int? maxLines, TextOverflow? textOverflow, TextTransform? textTransform, bool? beforeAfterNull}) Style
generateTextStyle() TextStyle
merge(Style other) Style
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

fromCss(String css, OnCssParseError? onCssParseError) Map<String, Style>
fromThemeData(ThemeData theme) Map<String, Style>