LiquidToggleBar class Null safety

Horizontal tab interface capable of handing any number of inputs. Easily customize colors with an easy to use set of attributes. basic usage List

Column( mainAxisSize: MainAxisSize.min, children: [ Padding( padding: const EdgeInsets.only(top: 8.0), child: Container( child: Padding( padding: EdgeInsets.symmetric(horizontal: 18), child: LiquidToggleBar( tabsNames: tabsNames, height: 35, backgroundColor: Theme.of(context).primaryColorLight, selectedTabColor: Theme.of(context).primaryColor, tabColor: Theme.of(context).accentColor, onSelectionUpdated: (index) => setState(() => currentIndex = index), ), ), ), ), Expanded(child: screenListcurrentIndex), ], )

Inheritance

Constructors

LiquidToggleBar({required List<String> tabsNames, Color backgroundColor = Colors.grey, Color selectedTabColor = Colors.orangeAccent, Color tabColor = Colors.orange, Color selectedTextColor = Colors.white, Color textColor = Colors.white, required dynamic onSelectionUpdated(int), double borderRadius = 12, double height = 30, double fontSize = 15, Key? key})

Properties

backgroundColor Color
The background color of the card holding tabs
final
borderRadius double
The radius of the card holding the tabs
final
fontSize double
fontsize of all text
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
height double
height of the tabBar
final
key Key?
optional key
final
onSelectionUpdated → dynamic Function(int)
The callback function that gives the index
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selectedTabColor Color
The background color of the active tab
final
selectedTextColor Color
The text color of the active tab
final
tabColor Color
The background color of any shown inactive tabs
final
tabsNames List<String>
The list of tab names
final
textColor Color
The text color of the inactive tabs
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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. [...]
@nonVirtual, inherited