TxCell class

一个用于展示数据及其描述的组件。

主要用于展示label:value形式的数据 纯展示组件,如需更多功能请使用ListTile

Inheritance

Constructors

TxCell({Key? key, Widget? label, String? labelText, TextStyle? labelTextStyle, Widget? leading, TextStyle? leadingTextStyle, Color? iconColor, Widget? content, String? contentText, TextStyle? contentTextStyle, EdgeInsetsGeometry? padding, double? minLabelWidth, bool? dense, VisualDensity? visualDensity, Color? contentTextColor, double? horizontalGap, double? minLeadingWidth, double? minVerticalPadding, TextAlign? contentTextAlign, int? contentMaxLines = 1})
创建一个TxCell组件
const

Properties

content → Widget?
展示的主体内容小部件
final
contentMaxLines → int?
content 文字最多显示行数
final
contentText → String?
展示的主体内容文字
final
contentTextAlign → TextAlign?
content 内容的对齐方式
final
contentTextColor → Color?
定义 content 的默认颜色。
final
contentTextStyle → TextStyle?
content或contentText的文字样式
final
dense → bool?
此cell是否是垂直密集列表的一部分。
final
hashCode → int
The hash code for this object.
no setterinherited
horizontalGap → double?
label和leading/content小部件之间的水平间隙。
final
iconColor → Color?
定义 leading图标的默认颜色。
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → Widget?
描述展示内容的可选小部件。
final
labelText → String?
描述展示内容的可选文本。
final
labelTextStyle → TextStyle?
label或labelText的文字样式
final
leading → Widget?
在标题前显示的小部件。
final
leadingTextStyle → TextStyle?
leading 的文字样式
final
minLabelWidth → double?
分配给 label 小部件的最小宽度。
final
minLeadingWidth → double?
分配给 leading 小部件的最小宽度。
final
minVerticalPadding → double?
最小垂直间距
final
padding → EdgeInsetsGeometry?
cell的内部填充。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
visualDensity → VisualDensity?
定义cell的紧凑程度。
final

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.
inherited
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

Static Methods

fromMap(Map<String, dynamic> data, {Map<int, Widget>? slots, bool? dense, VisualDensity? visualDensity, double? minLabelWidth, double? minLeadingWidth, double? minVerticalPadding, double? horizontalGap, TextStyle? contentTextStyle, TextStyle? labelTextStyle, TextAlign? contentTextAlign, EdgeInsetsGeometry? padding, int? contentMaxLines = 1}) → List<Widget>