TxButtonBar class
一排横置排列的操作按钮
提供了主按钮与辅按钮的构造方法,主按钮一般为ElevatedButton,辅按钮一般为 OutlinedButton,actions一般为一组IconButton
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- TxButtonBar
Constructors
-
TxButtonBar.new({required Widget mainButton, Key? key, Widget? secondaryButton, List<
Widget> ? actions, EdgeInsetsGeometry? buttonPadding, ButtonTextTheme? buttonTextTheme, double? buttonHeight, double? buttonMinWidth, ButtonBarLayoutBehavior? layoutBehavior, bool? buttonAlignedDropdown}) -
创建一个操作按钮栏。
const
-
TxButtonBar.more({required Widget mainButton, Key? key, Widget? secondaryButton, List<
Widget> ? actions, EdgeInsetsGeometry? buttonPadding, ButtonTextTheme? buttonTextTheme, double? buttonHeight, double? buttonMinWidth, ButtonBarLayoutBehavior? layoutBehavior, bool? buttonAlignedDropdown}) - 创建一个包含PopupMenuButton的操作按钮栏,一般用于操作比较多的情况
Properties
-
actions
→ List<
Widget> ? -
icon按钮的集合
final
-
覆盖周围的 ButtonThemeData.alignedDropdown 以定义 DropdownButton 菜单的
宽度是否与按钮的宽度匹配。
final
-
覆盖周围的 ButtonThemeData.height 以定义按钮的最小高度。
final
-
覆盖周围的 ButtonThemeData.minWidth 以定义按钮的最小宽度。
final
-
覆盖周围的 ButtonThemeData.padding 以定义按钮子项(通常是按钮的标签)的填充。
final
-
覆盖周围的 ButtonBarThemeData.buttonTextTheme 以定义按钮的基色、大小、内部填充
和形状。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layoutBehavior → ButtonBarLayoutBehavior?
-
定义 OverflowBar 是否应使用最小大小约束或填充来调整自身大小。
final
- mainButton → Widget
-
主按钮
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondaryButton → Widget?
-
辅按钮
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