CountmanTextStyle class

Visual style for the text displays — shared by TextCounter, TextCountdown and TextElapsed (see the TextCounterStyle / TextCountdownStyle / TextElapsedStyle aliases in those files).

Groups text styling, per-affix styling, Text forwarding options, and the container decoration into one reusable, themeable, mergeable object. All fields nullable; unset fields fall back to the enclosing provider then to framework defaults.

文本显示组件的视觉样式——由 TextCounter、TextCountdown、TextElapsed 共用 (见各文件中的 TextCounterStyle / TextCountdownStyle / TextElapsedStyle 别名)。

把文字样式、前后缀样式、Text 转发选项、容器装饰聚合为一个可复用、可主题化、 可合并的对象。所有字段可空;未设置的字段回退到所在 provider,再回退到框架默认值。

Annotations

Constructors

CountmanTextStyle({TextStyle? textStyle, TextStyle? prefixStyle, TextStyle? suffixStyle, EdgeInsetsGeometry? padding, Decoration? decoration, TextAlign? textAlign, int? maxLines, TextOverflow? overflow, bool? softWrap, StrutStyle? strutStyle, TextScaler? textScaler, Locale? locale, TextWidthBasis? textWidthBasis})
Creates a text style. All fields optional.
const

Properties

decoration → Decoration?
Box decoration (background/border/radius/gradient/shadow).
final
hashCode → int
The hash code for this object.
no setterinherited
locale → Locale?
final
maxLines → int?
final
overflow → TextOverflow?
final
padding → EdgeInsetsGeometry?
Inner padding around the widget's content.
final
prefixStyle → TextStyle?
Text style for the prefix string (falls back to textStyle).
final
props → List<Object?>
The ordered field values backing operator == and hashCode.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
softWrap → bool?
final
strutStyle → StrutStyle?
final
suffixStyle → TextStyle?
Text style for the suffix string (falls back to textStyle).
final
textAlign → TextAlign?
Forwarded to the number Text. See Text for semantics.
final
textScaler → TextScaler?
final
textStyle → TextStyle?
Text style for the number itself.
final
textWidthBasis → TextWidthBasis?
final

Methods

copyWith({TextStyle? textStyle, TextStyle? prefixStyle, TextStyle? suffixStyle, EdgeInsetsGeometry? padding, Decoration? decoration, TextAlign? textAlign, int? maxLines, TextOverflow? overflow, bool? softWrap, StrutStyle? strutStyle, TextScaler? textScaler, Locale? locale, TextWidthBasis? textWidthBasis}) → CountmanTextStyle
Returns a copy with the given fields replaced.
merge(CountmanTextStyle? other) → CountmanTextStyle
Merges with a lower-priority other: this object's non-null fields win, other's fill the gaps. Used to layer widget style over provider style.
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