CustomScaffold class

A customizable Scaffold with curved navigation bar and user profile.

Inheritance

Constructors

CustomScaffold.new({Key? key, required int currentIndex, required ValueChanged<int> onTabTapped, required List<Widget> pages, Widget? body, required String userName, String welcomeMessage = 'Welcome', required ImageProvider<Object> userImage, List<Widget> navItems = const [Icon(Icons.home, size: 30, color: Colors.white), Icon(Icons.search, size: 30, color: Colors.white), Icon(Icons.add, size: 30, color: Colors.white), Icon(Icons.notifications, size: 30, color: Colors.white), Icon(Icons.person, size: 30, color: Colors.white)], Color navBarColor = const Color(0x33FFFFFF), Color navBackgroundColor = Colors.transparent, Color navButtonBackgroundColor = const Color(0x4DFFFFFF), double navBarHeight = 75, Duration animationDuration = const Duration(milliseconds: 600), Curve animationCurve = Curves.easeInOut, double appBarHeight = 80, Color appBarBackgroundColor = Colors.transparent, double appBarElevation = 0, Widget? leading, List<Widget>? actions})
const

Properties

actions List<Widget>?
Optional action widgets in AppBar
final
animationCurve Curve
Animation curve for transitions
final
animationDuration Duration
Animation duration for tab switching
final
appBarBackgroundColor Color
Background color of the AppBar
final
appBarElevation double
Elevation of the AppBar
final
appBarHeight double
Height of the AppBar
final
body Widget?
Optional custom body widget (bypasses pages)
final
currentIndex int
Current selected tab index
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
Optional leading widget in AppBar
final
Background color around navbar
final
Navigation bar container color
final
Height of the navigation container
final
Color of the active button background
final
List of widgets to display as nav items
final
onTabTapped ValueChanged<int>
Callback when a tab is tapped
final
pages List<Widget>
Pages corresponding to each navigation item
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userImage ImageProvider<Object>
Profile image provider
final
userName String
User's display name
final
welcomeMessage String
Welcome message displayed above the name
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CustomScaffoldState
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