AntdTabs class
@t 标签页 @g 导航 @o 90 @d 内容组之间进行导航切换。 @u 当前内容需要分成同层级结构的组,进行内容切换展示,常用在表单或者列表的顶部。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AntdStateComponent<
AntdTabsStyle, AntdTabs> - AntdScrollView<
AntdTabsStyle, AntdTabs, AntdTabController< AntdTab> > - AntdScrollPositionedBase<
AntdTab, AntdTabsStyle, AntdTabs, AntdTabController< AntdTab> > - AntdBaseTabs<
AntdTabsStyle, AntdTab, AntdTabs> - AntdTabs
- Implementers
Constructors
-
AntdTabs.new({Key? key, AntdTabsStyle? style, AntdStyleBuilder<
AntdTabsStyle, AntdTabs> ? styleBuilder, Widget? leftExtra, Widget? rightExtra, AntdTabController<AntdTab> ? controller, String? activeValue, AntdTabsOnChange<AntdTab> ? onChange, AntdTabAlignment tabAlignment = AntdTabAlignment.center, required List<AntdTab> tabs, AntdIndicatorPosition indicatorPosition = AntdIndicatorPosition.bottom, AntdIndicatorMode indicatorMode = AntdIndicatorMode.fixed, AntdHapticFeedback? hapticFeedback = AntdHapticFeedback.light}) -
const
Properties
- activeValue → String?
-
默认选中的标签key(为空时不激活任何一个)
finalinherited
- alignment → AntdEdge?
-
根据方向自动优化视图边界
finalinherited
- cacheExtent → double
-
预渲染区域大小
finalinherited
- cacheExtentStyle → CacheExtentStyle
-
预渲染区域计算方式
finalinherited
-
controller
→ AntdTabController<
AntdTab> ? -
控制器
finalinherited
- dragStartBehavior → DragStartBehavior
-
拖动开始行为
finalinherited
- edgeThreshold → double?
-
触边阈值 (0-1表示百分比)
finalinherited
- fit → AntdScrollItemFit
-
自动适配策略
finalinherited
-
尾部的sliver
finalinherited
- gridDelegate → SliverGridDelegate?
-
宫格排列
finalinherited
- hapticFeedback → AntdHapticFeedback?
-
开启反馈
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ List<
Widget> ? -
头部的sliver
finalinherited
- indicatorMode → AntdIndicatorMode
-
指示器宽度模式(固定/自适应标签宽度)
finalinherited
- indicatorPosition → AntdIndicatorPosition
-
指示器位置(顶部/底部)
finalinherited
-
itemBuilder
→ AntdScrollItemBuilder<
AntdTab, AntdTabController< ?AntdTab> > -
数据构造器
finalinherited
-
items
→ List<
AntdTab> -
滚动的数据
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leftExtra → Widget?
-
标签栏左侧扩展内容区域
finalinherited
-
onChange
→ AntdTabsOnChange<
AntdTab> ? -
标签切换时的回调(参数为当前选中key)
finalinherited
- onEdgeReached → AntdOnScrollEdge?
-
当触碰到边界时的回调
finalinherited
-
onItemPosition
→ AntdItemPositionListener<
AntdTab> ? -
item变更事件
finalinherited
- physics → ScrollPhysics?
-
滚动物理效果
finalinherited
- reversed → bool
-
是否反向滚动
finalinherited
- rightExtra → Widget?
-
标签栏右侧扩展内容区域
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollBehavior → ScrollBehavior?
-
滚动行为
finalinherited
- shrinkWrap → bool?
-
自动扩展高度
finalinherited
-
slivers
→ List<
Widget> ? -
子组件
finalinherited
- style → AntdTabsStyle?
-
样式
finalinherited
-
styleBuilder
→ AntdStyleBuilder<
AntdTabsStyle, AntdTabs> ? -
动态样式
finalinherited
- tabAlignment → AntdTabAlignment
-
标签对齐方式(居中时会自动启用滚动或填充)
finalinherited
-
tabs
→ List<
AntdTab> -
标签页配置列表(至少包含一个标签)
finalinherited
- throttle → Duration?
-
滚动事件节流时长
finalinherited
- vertical → bool
-
滚动方向
finalinherited
- viewportOffset → double?
-
偏移位置
finalinherited
- virtual → bool
-
启动虚拟滚动
finalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
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
-
getDefaultStyle(
BuildContext context, AntdTheme theme, AntdMapToken token) → AntdTabsStyle -
override
-
getFinalStyle(
BuildContext context, AntdTabsStyle style, AntdMapToken token) → AntdTabsStyle -
inherited
-
getInputStyle(
BuildContext context) → AntdTabsStyle? -
inherited
-
getStyle(
BuildContext context) → AntdTabsStyle -
inherited
-
getStyleBuilder(
BuildContext context) → AntdStyleBuilder< AntdTabsStyle, AntdTabs> ? -
inherited
-
getThemeStyle(
BuildContext context, AntdTheme theme) → AntdStyleBuilder< AntdTabsStyle, AntdTabs> ? -
override
-
getWidget(
BuildContext context) → AntdTabs -
override
-
margeStyle(
AntdTabsStyle defaultStyle, AntdTabsStyle? style) → AntdTabsStyle -
override
-
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