MText class

Inheritance
Available extensions

Constructors

MText(String? data, {Key? key, Color? color, TextDecoration? decoration, String? fontFamily, double? fontSize, FontStyle? fontStyle, FontWeight? fontWeight, bool forceStrutHeight = false, Paint? foreground, bool isBold = false, bool isDeleted = false, bool isItalic = false, double? height, double? lineHeight, Locale? locale, int? maxLines, TextOverflow? overflow, Color? selectionColor, String? semanticsLabel, List<Shadow>? shadows, bool? softWrap, StrutStyle? strutStyle, TextStyle? style, TextAlign? textAlign, TextDirection? textDirection, TextHeightBehavior? textHeightBehavior, TextScaler? textScaler, TextWidthBasis? textWidthBasis})
const
MText.rich({Key? key, InlineSpan? text, List<InlineSpan>? children, Color? color, TextDecoration? decoration, String? fontFamily, double? fontSize, FontStyle? fontStyle, FontWeight? fontWeight, bool forceStrutHeight = false, Paint? foreground, bool isBold = false, bool isDeleted = false, bool isItalic = false, double? height, double? lineHeight, Locale? locale, int? maxLines, TextOverflow? overflow, Color? selectionColor, String? semanticsLabel, List<Shadow>? shadows, bool? softWrap, StrutStyle? strutStyle, TextStyle? style, TextAlign? textAlign, TextDirection? textDirection, TextHeightBehavior? textHeightBehavior, TextScaler? textScaler, TextWidthBasis? textWidthBasis})
const

Properties

children List<InlineSpan>?
文本片段集合
final
color Color?
文本颜色
final
data String?
文本内容
final
decoration TextDecoration?
final
fontFamily String?
字体
final
fontSize double?
字体大小
final
fontStyle FontStyle?
字体风格
final
fontWeight FontWeight?
字体粗细
final
forceStrutHeight bool
是否强制使用高度
final
foreground Paint?
前景
final
hashCode int
The hash code for this object.
no setterinherited
height double?
文本垂直支撑的最小高度,是对应 fontSize 的倍数。
final
isBold bool
是否加粗
final
isDeleted bool
是否显示删除线
final
isItalic bool
是否斜体
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lineHeight double?
行高, 自动除以 fontSize 来计算, 如果设置 height 则会忽略此值.
final
locale Locale?
final
maxLines int?
文本最大行数
final
overflow TextOverflow?
文本溢出模式
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectionColor Color?
final
semanticsLabel String?
final
shadows List<Shadow>?
final
softWrap bool?
final
strutStyle StrutStyle?
文本支撑样式, 定义文本的垂直布局属性
final
style TextStyle?
文本样式
final
textAlign TextAlign?
文本对齐
final
textDirection TextDirection?
文本方向
final
textHeightBehavior TextHeightBehavior?
final
textScaler TextScaler?
文本缩放
final
textSpan InlineSpan?
文本片段
final
textWidthBasis TextWidthBasis?
final
toSpan InlineSpan

Available on MText, provided by the MTextToSpanExt extension

no setter
toTextSpan TextSpan

Available on MText, provided by the MTextToSpanExt extension

no setter

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited