StylishBottomBar class
StylishBottomBar class to implement beautiful bottom bar widget
StylishBottomBar(
items: [
AnimatedBarItems(
icon: Icon(
Icons.home,
),
selectedColor: Colors.deepPurple,
backgroundColor: Colors.amber,
title: Text('Home')),
AnimatedBarItems(
icon: Icon(
Icons.add_circle_outline,
),
selectedColor: Colors.green,
backgroundColor: Colors.amber,
title: Text('Add')),
AnimatedBarItems(
icon: Icon(
Icons.person,
),
backgroundColor: Colors.amber,
selectedColor: Colors.pinkAccent,
title: Text('Profile')),
// BubbleBarItem(icon: Icon(Icons.home), title: Text('Home')),
// BubbleBarItem(icon: Icon(Icons.add_circle_outline), title: Text('Add')),
// BubbleBarItem(icon: Icon(Icons.person), title: Text('Profile')),
],
iconSize: 32,
barAnimation: BarAnimation.liquid,
// iconStyle: IconStyle.animated,
// iconStyle: IconStyle.simple,
hasNotch: true,
fabLocation: StylishBarFabLocation.end,
opacity: 0.3,
currentIndex: selected ?? 0,
//Bubble bar specific style properties
//unselectedIconColor: Colors.grey,
//barStyle: BubbleBarStyle.horizotnal,
//bubbleFillStyle: BubbleFillStyle.fill,
onTap: (index) {
setState(() {
selected = index;
});
},
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- StylishBottomBar
Constructors
-
StylishBottomBar({Key? key, required List items, IconStyle? iconStyle, Color? backgroundColor, double? elevation, int? currentIndex = 0, double? iconSize = 26.0, EdgeInsets? padding = EdgeInsets.zero, bool? inkEffect = false, Color? inkColor = Colors.grey, ValueChanged<
int?> ? onTap, double? opacity = 0.8, BorderRadius? borderRadius, StylishBarFabLocation? fabLocation, bool hasNotch = false, BarAnimation? barAnimation = BarAnimation.fade, BubbleFillStyle? bubbleFillStyle = BubbleFillStyle.fill, Color? unselectedIconColor = Colors.black, BubbleBarStyle? barStyle = BubbleBarStyle.horizotnal})
Properties
- backgroundColor → Color?
-
Change animated navigation bar background color
final
- barAnimation → BarAnimation?
-
BarAnimation to animate items when current index changes
BarAnimation.fade
BarAnimation.blink
BarAnimation.transform3D
BarAnimation.liquid
final
- barStyle → BubbleBarStyle?
-
BarStyle to align icon and title in horizontal or vertical
BubbleBarStyle.horizotnal
BubbleBarStyle.vertical
Default value is BubbleBarStyle.horizotnal
final
- borderRadius → BorderRadius?
-
Change navigation bar border radius
final
- bubbleFillStyle → BubbleFillStyle?
-
Use this to customize the bubble background fill style
You can use border with BubbleFillStyle.outlined
and also fill the background with color using BubbleFillStyle.fill
final
- currentIndex ↔ int?
-
Used to change the selected item index
Default is 0
getter/setter pair
- elevation → double?
-
Add elevation to bottom navigation bar
final
- fabLocation → StylishBarFabLocation?
-
Adjust bubble navigation items according to the fab location
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNotch → bool
-
Add notch effect to floating action button
final
- iconSize → double?
-
Change Icon size
Default is 26.0
final
- iconStyle → IconStyle?
-
Change icon style
IconStyle.simple
IconStyle.animated
final - inkColor → Color?
-
Change ink color
Default color is Colors.grey
final
- inkEffect → bool?
-
Enable ink effect to bubble navigation bar item
Default value is
false
final - items → List
-
Add navigation bar items
AnimatedBarItems and BubbleBarItem
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onTap
→ ValueChanged<
int?> ? -
Function to return current selected item index
final
- opacity → double?
-
Change navigation bar items background color opacity
final
- padding → EdgeInsets?
-
Add padding arround navigation tiles
Default padding is EdgeInsets.zero
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unselectedIconColor → Color?
-
Change unselected item color
If you don't want to change every single icon color use this property
this will bulk change all the unselected icon color which does'nt have color property.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StylishBottomBar> -
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