Style class Null safety

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

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 non-existent 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>