TxPanel class

通用面板组件

Inheritance

Constructors

TxPanel({required Widget? title, Key? key, Widget? leading, Widget? subtitle, Widget? trailing, Widget? footer, Widget? content, GestureTapCallback? onTap, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, bool? dense = false, Color? panelColor, double? verticalGap, double? horizontalTitleGap, bool enabled = true, bool selected = false, VisualDensity? visualDensity, ShapeBorder? shape, Color? selectedColor, Color? iconColor, Color? textColor, GestureLongPressCallback? onLongPress, MouseCursor? mouseCursor, Color? focusColor, Color? splashColor, Color? hoverColor, FocusNode? focusNode, bool autofocus = false, Color? selectedPanelColor, ValueChanged<bool>? onFocusChange, bool? enableFeedback, double? minLeadingWidth, TextStyle? titleTextStyle, TextStyle? subtitleTextStyle, TextStyle? contentTextStyle, TextStyle? leadingAndTrailingTextStyle, ListTileTitleAlignment? titleAlignment, Color? highlightColor})
const

Properties

autofocus → bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
content → Widget?
展示在title与footer之间的小部件
final
contentTextStyle → TextStyle?
TxPanel 的 content 的文本样式。
final
dense → bool?
面板是否是垂直密集列表的一部分。
final
enabled → bool
此面板是否是交互式的。
final
enableFeedback → bool?
检测到的手势是否应提供声音和/或触觉反馈。
final
focusColor → Color?
面板 的 Material 具有输入焦点时的颜色。
final
focusNode → FocusNode?
An optional focus node to use as the focus node for this widget.
final
展示在面板最底部的小部件。
final
hashCode → int
The hash code for this object.
no setterinherited
highlightColor → Color?
按下时面板的高亮颜色。
final
horizontalTitleGap → double?
title和leading/trailing小部件之间的水平间隙。
final
hoverColor → Color?
当指针悬停在面板上时,面板 Material 的颜色。
final
iconColor → Color?
定义leading和trailing图标的默认颜色。
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading → Widget?
在标题前显示的小部件。
final
leadingAndTrailingTextStyle → TextStyle?
TxPanel 的 leading 和 trailing 的文本样式。
final
margin → EdgeInsetsGeometry?
面板的外边距
final
minLeadingWidth → double?
分配给 leading 小部件的最小宽度。
final
mouseCursor → MouseCursor?
鼠标指针进入或悬停小部件时的光标。
final
onFocusChange → ValueChanged<bool>?
Handler called when the focus changes.
final
onLongPress → GestureLongPressCallback?
当用户长按此面板时调用
final
onTap → GestureLongPressCallback?
当用户点击面板时调用
final
padding → EdgeInsetsGeometry?
面板的内边距
final
panelColor → Color?
当 selected 为 false 时,定义 Panel 的背景颜色。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selected → bool
如果此图块也已 enabled,则图标和文本将以相同的颜色呈现。
final
selectedColor → Color?
定义选择面板时用于图标和文本的颜色。
final
selectedPanelColor → Color?
定义当 selected 为true时面板的背景颜色
final
shape → ShapeBorder?
定义面板InkResponse.customBorder and Ink.decoration的形状
final
splashColor → Color?
面板的 Material 的飞溅颜色。
final
subtitle → Widget?
标题下方显示的附加内容。
final
subtitleTextStyle → TextStyle?
TxPanel 的 subtitle 的文本样式。
final
textColor → Color?
定义title和subtitle的默认颜色。
final
title → Widget?
面板的标题
final
titleAlignment → ListTileTitleAlignment?
定义 TxPanel.leading 和 TxPanel.trailing 相对于 TxPanel 的标题 (TxPanel.title 和 TxPanel.subtitle)的垂直对齐方式。
final
titleTextStyle → TextStyle?
TxPanel 的 title 的文本样式。
final
trailing → Widget?
在标题后显示的小部件。
final
verticalGap → double?
content、title、subtitle、footer小部件之间的垂直间隙。
final
visualDensity → VisualDensity?
定义面板布局的紧凑程度
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

dividePanels(Iterable<Widget> tiles, {double width = 4.0}) → Iterable<Widget>