TextStyle class
CSS text styles.
StyledText('Title', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold));
Constructors
- TextStyle({num? fontSize, FontWeight? fontWeight, String? fontStyle, Color? color, num? letterSpacing, num? height, String? fontFamily, TextDecoration? decoration})
-
Creates CSS text style values.
const
Properties
- color → Color?
-
Text color.
final
- css → String
-
CSS declarations for this style.
no setter
- decoration → TextDecoration?
-
Text decoration.
final
- fontFamily → String?
-
Font family.
final
- fontSize → num?
-
Font size in logical pixels.
final
- fontStyle → String?
-
Font style string (for example
italic).final - fontWeight → FontWeight?
-
Font weight.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → num?
-
Line-height multiplier.
final
- letterSpacing → num?
-
Letter spacing in logical pixels.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{num? fontSize, FontWeight? fontWeight, String? fontStyle, Color? color, num? letterSpacing, num? height, String? fontFamily, TextDecoration? decoration}) → TextStyle - Returns a copy with selected values replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited