WaveBottomBar class

A bottom widget that like a wave can smoothly move to the active position and provide much attrs to config the widget

Inheritance

Constructors

WaveBottomBar({Key? key, double? width, double height = 56.0, double amplitude = 25, double waveLength = 100, Color? backgroundColor, double? elevation, Color? shadowColor, int initialIndex = 0, required List<BottomNavigationBarItem> items, Widget? fixedWidget, WaveBottomBarType type = WaveBottomBarType.normal, WaveBottomBarDirection direction = WaveBottomBarDirection.up, WaveBarController? controller, double selectedLabelMargin = 8, double unselectedLabelMargin = 5, double activeTopMargin = -25, BorderRadius corner = BorderRadius.zero, Duration duration = const Duration(milliseconds: 50), Curve curve = Curves.linear, TextStyle? selectedLabelStyle, TextStyle? unselectedLabelStyle, bool showSelectedLabel = true, bool showUnselectedLabel = true, bool removeBottom = false, required dynamic onTap(int index)})

Properties

activeTopMargin → double
the margin between the active item and top of the wave
final
amplitude → double
amplitude or height of the WavePainter If the value is 0, the wave is gone
final
backgroundColor → Color?
whole widget background color
final
controller → WaveBarController?
this is used to update the current index
final
corner → BorderRadius
corner radius of the WaveBottomBar
final
curve → Curve
the wave move anim curve
final
direction → WaveBottomBarDirection
direction of the WaveBottomBar See WaveBottomBarDirection for more information
final
duration → Duration
the wave move anim duration
final
elevation → double?
shadow of the WavePainter
final
fixedWidget → Widget?
widget inside wave only can be configured when type is fixed
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
height of the WaveBottomBar
final
initialIndex → int
the initial active index of the WaveBottomBar
final
items → List<BottomNavigationBarItem>
widget list of the WaveBottomBar contains normal icon, active icon and text
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap → dynamic Function(int index)
called when one of the items is tapped.
final
removeBottom → bool
whether remove padding of bottom
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedLabelMargin → double
the margin between active label and icon
final
selectedLabelStyle → TextStyle?
active item text style
final
shadowColor → Color?
shadow color of the WavePainter
final
showSelectedLabel → bool
whether the labels are shown for the selected BottomNavigationBarItem.
final
showUnselectedLabel → bool
whether the labels are shown for the unselected BottomNavigationBarItems.
final
type → WaveBottomBarType
type of the WaveBottomBar See WaveBottomBarType for more information
final
unselectedLabelMargin → double
the margin between normal label and icon
final
unselectedLabelStyle → TextStyle?
normal item text style
final
waveLength → double
length of the WavePainter If the value is 0, the wave is gone
final
width → double?
width of the WaveBottomBar
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, 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