StylishBottomBar class

StylishBottomBar class to implement beautiful bottom bar widget


StylishBottomBar(
  items: [
    BottomBarItem(
      icon: Icon(
              Icons.home,
        ),
      selectedColor: Colors.deepPurple,
      backgroundColor: Colors.amber,
      title: Text('Home')),
    BottomBarItem(
      icon: Icon(
              Icons.add_circle_outline,
        ),
      selectedColor: Colors.green,
      backgroundColor: Colors.amber,
      title: Text('Add')),
    BottomBarItem(
      icon: Icon(
              Icons.person,
        ),
      backgroundColor: Colors.amber,
      selectedColor: Colors.pinkAccent,
      title: Text('Profile')),
   ],
   option: AnimatedBarOptions(
       iconStyle: IconStyle.animated,
       barAnimation: BarAnimation.liquid,
       opacity: 0.3,
   ),
   onTap: (index) {
       setState(() {
           selected = index;
       });
   },

 );

Inheritance

Constructors

StylishBottomBar({Key? key, required List<BottomBarItem> items, Color? backgroundColor, double elevation = 8.0, int currentIndex = 0, ValueChanged<int>? onTap, BorderRadius? borderRadius, StylishBarFabLocation? fabLocation, bool hasNotch = false, required BottomBarOption option, Gradient? gradient})

Properties

backgroundColor Color?
Change animated navigation bar background color
final
borderRadius BorderRadius?
Change navigation bar items background color opacity Change navigation bar border radius
final
currentIndex int
Change Icon size Default is 26.0 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
gradient Gradient?
The gradient property defines a gradient color pattern for the widget. The gradient can be used to add a colorful background or add gradient colors to the widget. The gradient is defined using the Gradient class, which provides various options to specify the gradient colors and direction. Example usage:
final
hashCode int
The hash code for this object.
no setterinherited
hasNotch bool
Add notch effect to floating action button
final
items List<BottomBarItem>
Add navigation bar items BottomBarItem
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
option BottomBarOption
Customize bottom bar items style and other properties
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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