BrnSwitchTitle class

描述: 一级切换标题

Inheritance
Available Extensions

Constructors

BrnSwitchTitle({Key? key, required List<String> nameList, int defaultSelectIndex = 0, void onSelect(int index)?, double indicatorWeight = 2.0, double indicatorWidth = 24.0, EdgeInsets padding = const EdgeInsets.fromLTRB(0, 14, 20, 14), TabController? controller, TextStyle? selectedTextStyle, TextStyle? unselectedTextStyle})
const

Properties

controller TabController?
控制tab切换,默认不需要传递 只在需要外部控制tab切换时传递
final
defaultSelectIndex int
默认选中index 默认值0
final
hashCode int
The hash code for this object.
no setterinherited
indicatorWeight double
下划线的高度,默认是 2
final
indicatorWidth double
下划线的宽度,默认是 24。indicatorWidth 要大于等于 indicatorWeight。
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
nameList List<String>
标题的文案列表
final
onSelect → (void Function(int index)?)
选中时的回调 index 选中的title的索引
final
padding EdgeInsets
标题的 padding,默认 EdgeInsets.fromLTRB(0, 14, 20, 14)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedTextStyle TextStyle?
选中时的标题样式,默认 TextStyle(fontWeight: FontWeight.w600,fontSize: 18)
final
unselectedTextStyle TextStyle?
未选中时的标题样式,默认 TextStyle(fontWeight: FontWeight.w600,fontSize: 18)
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _BrnSwitchTitleState
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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