SmartTabLayout class
TabBar 扩展组件
自定义指示器 SmartImageTabIndicator Picture indicator SmartUnderlineTabIndicator Underline indicator
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SmartTabLayout
Constructors
-
SmartTabLayout({TabController? controller, ScrollController? scrollController, double? height, double? width, double? space, IndexedWidgetBuilder? spaceBuilder, double minHeight = 0, double minWidth = 0, EdgeInsets? margin, EdgeInsets padding = EdgeInsets.zero, Color? background, BorderRadius? borderRadius, BoxBorder? border, Axis direction = Axis.horizontal, int? childCount, List<
String> ? labels, ScrollPhysics? physics, ValueChanged<int> ? onTap, IndexedWidgetBuilder? itemBuilder, bool isScrollable = false, double? itemHeight, double? itemWidth, EdgeInsets? itemPadding, Color? itemBackground = Colors.transparent, BorderRadius? itemBorderRadius, BoxBorder? itemBorder, TextStyle itemTextStyle = const TextStyle(color: Colors.black, fontSize: 14, fontWeight: FontWeight.w500), double? itemSelectedHeight, double? itemSelectedWidth, EdgeInsets? itemSelectedPadding, Color? itemSelectedBackground, BorderRadius? itemSelectedBorderRadius, BoxBorder? itemSelectedBorder, TextStyle? itemSelectedTextStyle, bool isInkWell = false, Color itemSplashColor = Colors.black, Color? itemShadowColor, double itemElevation = 0, bool itemTransition = false, Color? indicatorColor, double indicatorWeight = 2.0, double? indicatorWidth, EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero, Decoration? indicator, bool automaticIndicatorColorAdjustment = true, TabBarIndicatorSize? indicatorSize, BorderRadius indicatorBorderRadius = BorderRadius.zero})
Properties
- automaticIndicatorColorAdjustment → bool
-
Whether this tab bar should automatically adjust the indicatorColor.
final
- background → Color?
-
final
- border → BoxBorder?
-
final
- borderRadius → BorderRadius?
-
final
- childCount → int
-
final
- controller → TabController?
-
final
- direction → Axis
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
final
- indicator → Decoration?
-
Defines the appearance of the selected tab indicator.
final
- indicatorBorderRadius → BorderRadius
-
final
- indicatorColor → Color?
-
The color of the line that appears below the selected tab.
final
- indicatorPadding → EdgeInsetsGeometry
-
Padding for indicator.
This property will now no longer be ignored even if indicator is declared
or provided by TabBarTheme
final
- indicatorSize → TabBarIndicatorSize?
-
Defines how the selected tab indicator's size is computed.
final
- indicatorWeight → double
-
The thickness of the line that appears below the selected tab.
final
- indicatorWidth → double?
-
final
- isInkWell → bool
-
final
- isScrollable → bool
-
Whether this tab bar can be scrolled horizontally.
final
- itemBackground → Color?
-
final
- itemBorder → BoxBorder?
-
final
- itemBorderRadius → BorderRadius?
-
final
- itemBuilder → IndexedWidgetBuilder?
-
final
- itemElevation → double
-
final
- itemHeight → double?
-
final
- itemPadding → EdgeInsets?
-
final
- itemSelectedBackground → Color?
-
final
- itemSelectedBorder → BoxBorder?
-
final
- itemSelectedBorderRadius → BorderRadius?
-
final
- itemSelectedHeight → double?
-
final
- itemSelectedPadding → EdgeInsets?
-
final
- itemSelectedTextStyle → TextStyle
-
final
- itemSelectedWidth → double?
-
final
- itemShadowColor → Color?
-
final
- itemSplashColor → Color
-
final
- itemTextStyle → TextStyle
-
final
- itemTransition → bool
-
This parameter is used to enable TabStyle transitions.
The default value is true
final
- itemWidth → double?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
labels
→ List<
String> ? -
final
- margin → EdgeInsets?
-
final
- minHeight → double
-
final
- minWidth → double
-
final
-
onTap
→ ValueChanged<
int> ? -
final
- padding → EdgeInsets
-
final
- physics → ScrollPhysics?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- space → double?
-
final
- spaceBuilder → IndexedWidgetBuilder?
-
final
- width → double?
-
final
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
-
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