CustomTabBar class

TabBar 组件

Inheritance

Constructors

CustomTabBar({required List<Widget> tabs, Key? key, TabController? controller, bool isScrollable = false, EdgeInsetsGeometry? padding, Color? indicatorColor, bool automaticIndicatorColorAdjustment = true, double indicatorWeight = 2.0, EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero, Decoration? indicator, TabBarIndicatorSize? indicatorSize, Color? dividerColor, double? dividerHeight, Color? labelColor, TextStyle? labelStyle, EdgeInsetsGeometry? labelPadding, Color? unselectedLabelColor, TextStyle? unselectedLabelStyle, DragStartBehavior dragStartBehavior = DragStartBehavior.start, WidgetStateProperty<Color?>? overlayColor, MouseCursor? mouseCursor, bool? enableFeedback, ValueChanged<int>? onTap, ScrollPhysics? physics, InteractiveInkFeatureFactory? splashFactory, BorderRadius? splashBorderRadius, TabAlignment? tabAlignment, TextScaler? textScaler, TabIndicatorAnimation? indicatorAnimation})
构造函数
const

Properties

automaticIndicatorColorAdjustment bool
自动调整指示器颜色
final
controller TabController?
控制器
final
dividerColor Color?
分割线颜色
final
dividerHeight double?
分割线高度
final
dragStartBehavior DragStartBehavior
拖拽行为
final
enableFeedback bool?
是否启用反馈
final
hashCode int
The hash code for this object.
no setterinherited
indicator Decoration?
指示器
final
indicatorAnimation TabIndicatorAnimation?
指示器动画
final
indicatorColor Color?
指示器颜色
final
indicatorPadding EdgeInsetsGeometry
指示器内边距
final
indicatorSize TabBarIndicatorSize?
指示器大小
final
indicatorWeight double
指示器宽度
final
isScrollable bool
是否可滚动
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelColor Color?
标签颜色
final
labelPadding EdgeInsetsGeometry?
标签内边距
final
labelStyle TextStyle?
标签样式
final
mouseCursor MouseCursor?
鼠标光标
final
onTap ValueChanged<int>?
点击回调
final
overlayColor WidgetStateProperty<Color?>?
覆盖颜色
final
padding EdgeInsetsGeometry?
内边距
final
physics ScrollPhysics?
物理
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splashBorderRadius BorderRadius?
水花效果边界
final
splashFactory InteractiveInkFeatureFactory?
水花效果工厂
final
tabAlignment TabAlignment?
标签对齐方式
final
tabs List<Widget>
标签
final
textScaler TextScaler?
文本缩放
final
unselectedLabelColor Color?
未选中标签颜色
final
unselectedLabelStyle TextStyle?
未选中标签样式
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