LabelStyle class
The style of a text label.
Constructors
- LabelStyle({TextStyle? textStyle, InlineSpan span(String)?, TextAlign? textAlign, TextDirection? textDirection, TextScaler? textScaler, int? maxLines, String? ellipsis, Locale? locale, StrutStyle? strutStyle, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, double? minWidth, double? maxWidth, PaintStyle? backgroundStyle, EdgeInsetsGeometry? backgroundPadding, double? backgroundCornerRadius, Offset? offset, double? rotation, Alignment? align})
- Creates a label style.
Properties
- align → Alignment?
-
How the block element align to the anchor point.
final
- backgroundCornerRadius → double?
-
final
- backgroundPadding → EdgeInsetsGeometry?
-
final
- backgroundStyle → PaintStyle?
-
final
- 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.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale → Locale?
-
The locale used to select region-specific glyphs.
final
- maxLines → int?
-
An optional maximum number of lines for the text to span, wrapping if
necessary.
final
- maxWidth → double?
-
The maximum width of the text layouting.
final
- minWidth → double?
-
The minimum width of the text layouting.
final
- offset → Offset?
-
The offset of the block element from the anchor.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- rotation → double?
-
The rotation of the block element.
final
- 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 text string.
final
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - strutStyle → StrutStyle?
-
The strut style to use. Strut style defines the strut, which sets minimum
vertical layout metrics.
final
- textAlign → TextAlign?
-
How the text should be aligned horizontally.
final
- textDirection → TextDirection?
-
The default directionality of the text.
final
- textHeightBehavior → TextHeightBehavior?
-
Defines how the paragraph will apply TextStyle.height to the ascent of the
first line and descent of the last line.
final
- textScaler → TextScaler?
-
The font scaling strategy to use when laying out and rendering the text.
final
- textStyle → TextStyle?
-
The text style of the label.
final
- textWidthBasis → TextWidthBasis?
-
Defines how to measure the width of the rendered text.
final
Methods
-
copyWith(
{TextStyle? textStyle, InlineSpan span(String)?, TextAlign? textAlign, TextDirection? textDirection, TextScaler? textScaler, int? maxLines, String? ellipsis, Locale? locale, StrutStyle? strutStyle, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, double? minWidth, double? maxWidth, PaintStyle? backgroundStyle, EdgeInsetsGeometry? backgroundPadding, double? backgroundCornerRadius, Offset? offset, double? rotation, Alignment? align}) → LabelStyle -
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