RollingNavBar class
Bottom nav bar with playful and customizable transitions between active states.
This widget is suitable for the bottom of a Stack or a Scaffold's
bottomNavigationBar
slot, though in the latter, a sizing wrapping widget
is required.
RollingNavBar has two named constructors, children
and iconData
, and
no default constructor. The two constructors exist to accept each of the
possible children types - a list of widgets (children
), or a list of raw
IconData objects (iconData
). Because iconData objects can be
dynamically inserted into Icon classes with custom styles, this constructor
offers much more helpful default active state handling.
RollingNavBar is a StatelessWidget that wraps an internal StatefulWidget for the purposes of introducing a LayoutBuilder in the render pipeline.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- RollingNavBar
Constructors
Properties
-
activeBadgeColors
→ List<
Color> -
Optional set of colors for badges while above the active indicator.
final
-
activeIconColors
→ List<
Color> -
Optional set of colors of each icon to display when in the active state.
final
- activeIndex → int
-
Initial tab in the highlighted state.
final
- animationCurve → Curve
-
Behavior of the active indicator's transition from tab to tab.
final
- animationType → AnimationType
-
Indicator for desired animation behavior.
final
-
badges
→ List<
Widget> -
Optional list of badges to apply to each nav item.
null
placeholders in the list are necessary for unbadged tab bar items.final - baseAnimationSpeed → int
-
Milliseconds for the background indicator to move one tab.
final
- builder → RollingNavBarChildBuilder
-
Optional builder function for the individual navigation icons.
final
- hashCode → int
- The hash code for this object.
-
iconColors
→ List<
Color> -
Optional override for icon colors. If supplied, must have a length of one
or the same length as iconData. A length of 1 indicates a single color
for all tabs.
final
-
iconData
→ List<
IconData> -
Icon data to render in the tab bar. Use this option if you want
RollingNavBar to manage your tabs' colors. Pass this or
children
.final - iconSize → double
-
Optional custom size for each tab bar icon.
final
-
iconText
→ List<
Widget> -
Optional list of text widgets to display beneath inactive icons.
final
-
indicatorColors
→ List<
Color> -
Optional list of colors for the active indicator. If supplied, must have a
length of one or the same length as iconData. A length of 1 indicates a
single color for all tabs.
final
- indicatorCornerRadius → double
-
Rounded edge of the active indicator's corners.
final
- indicatorRadius → double
-
Size of the background active indicator.
final
- indicatorSides → int
-
Number of sides to the background active indicator. Value of
null
indicates a circle, which negates the rolling effect.final - key → Key
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
Optional display override for the nav bar's background.
final
- numChildren → int
-
Used by the
builder()
constructor to know how many icons the tab bar should contain.final - onAnimate → dynamic Function(AnimationUpdate)
-
Optional handler which will be called on every tick of the animation.
final
- onTap → dynamic Function(int)
-
Optional handler which is passed every updated active index.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- sidesPerListItem → double
-
Rotation speed controller with a default value designed to create a
realistic rolling illusion.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.@protectedinherited -
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.
@nonVirtualinherited