SwitchBarWidget class

πŸ”Ή SwitchBarWidget

Inheritance

Constructors

SwitchBarWidget({Key? key, required List<SwitchItem> items, int initialIndex = 0, double height = 60, BorderRadiusGeometry? borderRadius = const BorderRadius.all(Radius.circular(20)), double borderWidth = 1, Color? borderColor = Colors.transparent, Color? backgroundColor, Color? selectedColor = Colors.blueAccent, Color? unselectedColor, TextStyle? selectedLabelStyle = const TextStyle(color: Colors.blueAccent, fontSize: 12), TextStyle? unselectedLabelStyle = const TextStyle(color: Colors.black54, fontSize: 12), Duration duration = const Duration(milliseconds: 280), bool isCupertinoStyle = false, bool isVertical = true, EdgeInsetsGeometry padding = EdgeInsets.zero, EdgeInsetsGeometry margin = const EdgeInsets.only(top: 10, bottom: 10), double itemSpacing = 5, void onSelected(SwitchItem item, int index)?, EdgeInsetsGeometry pagePadding = const EdgeInsets.only(top: 10), BorderRadiusGeometry pageBorderRadius = const BorderRadius.all(Radius.circular(5)), bool isSwipToChangePage = true, double? itemBoxHeight, IndicatorType indicatorType = IndicatorType.oval, double indicatorWidthFactor = 0.6, double indicatorHeight = 2.0, double dotSize = 6.0, double indicatorOvalBorder = 10, bool isShowLabel = false, double? indicatorSpace = 4})
const

Properties

backgroundColor β†’ Color?
final
borderColor β†’ Color?
final
borderRadius β†’ BorderRadiusGeometry?
final
borderWidth β†’ double
final
dotSize β†’ double
final
duration β†’ Duration
final
hashCode β†’ int
The hash code for this object.
no setterinherited
height β†’ double
final
indicatorHeight β†’ double
final
indicatorOvalBorder β†’ double
final
indicatorSpace β†’ double?
final
indicatorType β†’ IndicatorType
final
indicatorWidthFactor β†’ double
final
initialIndex β†’ int
final
isCupertinoStyle β†’ bool
final
isShowLabel β†’ bool
final
isSwipToChangePage β†’ bool
final
isVertical β†’ bool
final
itemBoxHeight β†’ double?
final
items β†’ List<SwitchItem>
final
itemSpacing β†’ double
final
key β†’ Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin β†’ EdgeInsetsGeometry
final
onSelected β†’ void Function(SwitchItem item, int index)?
final
padding β†’ EdgeInsetsGeometry
final
pageBorderRadius β†’ BorderRadiusGeometry
final
pagePadding β†’ EdgeInsetsGeometry
final
runtimeType β†’ Type
A representation of the runtime type of the object.
no setterinherited
selectedColor β†’ Color?
final
selectedLabelStyle β†’ TextStyle?
final
unselectedColor β†’ Color?
final
unselectedLabelStyle β†’ TextStyle?
final

Methods

createElement() β†’ StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() β†’ State<SwitchBarWidget>
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, 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