SmartNavBarItem class

A stateless widget that represents a single item in a custom navigation bar.

Inheritance

Constructors

SmartNavBarItem({Key? key, required int index, required int currentIndex, required String iconPath, required String label, required ValueChanged<int> onTap, Color activeColor = const Color(0xFF101720), Color inactiveColor = Colors.black, TextStyle activeTextStyle = const TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF101720)), TextStyle inactiveTextStyle = const TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), double iconSize = 24.0, double scaleFactor = 1.1})
Creates a visual representation of a navigation item that includes an icon and a label, and visually responds to selection by scaling and color changes.
const

Properties

activeColor Color
The color of the icon and label when the item is active.
final
activeTextStyle TextStyle
The text style used when the item is active.
final
currentIndex int
The currently selected index from the parent navigation bar.
final
hashCode int
The hash code for this object.
no setterinherited
iconPath String
The path to the SVG icon used for this item.
final
iconSize double
The size of the icon.
final
inactiveColor Color
The color of the icon and label when the item is inactive.
final
inactiveTextStyle TextStyle
The text style used when the item is inactive.
final
index int
The index of this item in the navigation bar.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String
The label shown below the icon.
final
onTap ValueChanged<int>
Callback triggered when this item is tapped.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleFactor double
The scale factor applied to the icon and text when the item is active.
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.
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