SilTopTabBarWidget class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SilTopTabBarWidget
Constructors
-
SilTopTabBarWidget({Key? key, required Widget itemBuilder(BuildContext, int), List<
String> ? titles, List<Widget> ? tabs, TabController? tabController, double? titleViewHeight, Alignment? titleViewAlignment = Alignment.centerLeft, double? indicatorWidth, double? indicatorHeight, Color? selectedIndicatorColor, Color? selectedLabelColor, TextStyle? selectedLabelStyle, bool titleViewIsScrollable = true, Color? unselectedLabelColor, TextStyle? unselectedLabelStyle, Color? dividerLineColor, bool dividerLineHide = false, Widget? titleViewChild, bool isShowCenter = false, EdgeInsetsGeometry? labelPadding, Decoration? indicator, Color? backgroundColor, void changeTap(int)?, EdgeInsetsGeometry? margin, Widget? titleView, EdgeInsetsGeometry? indicatorPadding, Decoration? decoration}) -
const
Properties
- backgroundColor → Color?
-
背景颜色
final
- changeTap → void Function(int)?
-
点击了分栏
final
- decoration → Decoration?
-
tabbar填充空间
final
- dividerLineColor → Color?
-
分割线颜色
final
- dividerLineHide → bool
-
隐藏分割线,默认不隐藏
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indicator → Decoration?
-
指示器
final
- indicatorHeight → double?
-
分割线高度,默认6.w
final
- indicatorPadding → EdgeInsetsGeometry?
-
指示器间距
final
- indicatorWidth → double?
-
分割线宽度,有值的时候固定宽度
final
- isShowCenter → bool
-
是否居中显示,默认从左上角开始显示,与是否滑动冲突
final
- itemBuilder → Widget Function(BuildContext, int)
-
单个分页
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelPadding → EdgeInsetsGeometry?
-
文本标签的填充
final
- margin → EdgeInsetsGeometry?
-
标题栏的外边距
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedIndicatorColor → Color?
-
选中时,指示器的颜色
final
- selectedLabelColor → Color?
-
选中时,标题的颜色
final
- selectedLabelStyle → TextStyle?
-
选中时,标题的样式
final
- tabController → TabController?
-
设置tabController
final
-
tabs
→ List<
Widget> ? -
自定义分栏标题栏,自定义分栏时,指示器相关的设置,都不起效果
final
-
titles
→ List<
String> ? -
分类标题
final
- titleView → Widget?
-
顶部的标题栏(自定义,需要结合TabController自己处理滑动事件、点击事件)
final
- titleViewAlignment → Alignment?
-
分类标题栏的显示位置,默认居中靠左对齐
final
- titleViewChild → Widget?
-
标题的子组件,例如显示右侧的按钮
final
- titleViewHeight → double?
-
分类标题栏的高度
final
- titleViewIsScrollable → bool
-
titleView是否可以滑动,默认true,每个标签都是其标签所需的宽度,整个TabBar是可滚动的。否则,每个选项卡将获得相同的可用空间份额
final
- unselectedLabelColor → Color?
-
未选中时,标题的颜色
final
- unselectedLabelStyle → TextStyle?
-
未选中时,标题的样式
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SilTopTabBarWidget> -
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