LabelStyle class
The style of a Label.
It includes not only properties for TextPainter, but also position settings to the anchor point.
See also:
- renderLabel, renders a label with an anchor point.
Constructors
- LabelStyle({TextStyle? style, InlineSpan span(String)?, TextAlign? textAlign, TextDirection? textDirection, double? textScaleFactor, int? maxLines, String? ellipsis, Locale? locale, StrutStyle? strutStyle, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, double? minWidth, double? maxWidth, Offset? offset, double? rotation, Alignment? align})
- Creates a label style.
Properties
- align ↔ Alignment?
-
How the label align to the anchor point.
getter/setter pair
- ellipsis ↔ String?
-
The string used to ellipsize overflowing text. Setting this to a non-empty
string will cause this string to be substituted for the remaining text
if the text can not fit within the specified maximum width.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale ↔ Locale?
-
The locale used to select region-specific glyphs.
getter/setter pair
- maxLines ↔ int?
-
An optional maximum number of lines for the text to span, wrapping if
necessary.
getter/setter pair
- maxWidth ↔ double?
-
The maximum width of the text layouting.
getter/setter pair
- minWidth ↔ double?
-
The minimum width of the text layouting.
getter/setter pair
- offset ↔ Offset?
-
The offset of the label from the anchor.
getter/setter pair
- rotation ↔ double?
-
The rotation of the label.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- span ↔ InlineSpan Function(String)?
-
The function to get the TextPainter.text form the Label.text.
getter/setter pair
- strutStyle ↔ StrutStyle?
-
The strut style to use. Strut style defines the strut, which sets minimum
vertical layout metrics.
getter/setter pair
- style ↔ TextStyle?
-
The text style of the label.
getter/setter pair
- textAlign ↔ TextAlign?
-
How the text should be aligned horizontally.
getter/setter pair
- textDirection ↔ TextDirection?
-
The default directionality of the text.
getter/setter pair
- textHeightBehavior ↔ TextHeightBehavior?
-
Defines how the paragraph will apply TextStyle.height to the ascent of the
first line and descent of the last line.
getter/setter pair
- textScaleFactor ↔ double?
-
The number of font pixels for each logical pixel.
getter/setter pair
- textWidthBasis ↔ TextWidthBasis?
-
Defines how to measure the width of the rendered text.
getter/setter pair
Methods
-
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.
override