SmartAppBar class
Intelligent SmartAppBar widget that automatically adapts to routes and context
Features:
- Automatic route-based configuration
- Multiple visual variants with professional effects
- Dynamic data integration via Cubit/Provider
- Theme-aware styling
- Smooth animations and transitions
- Full accessibility support
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SmartAppBar
- Implemented types
Constructors
-
SmartAppBar({Key? key, String? title, List<
SmartAppBarAction> ? actions, SmartAppBarVariant? variant, bool centerTitle = false, Color? backgroundColor, Color? foregroundColor, double elevation = 0.0, bool showBackButton = true, VoidCallback? onBackPressed, bool enableAnimations = true, Duration animationDuration = const Duration(milliseconds: 300), EdgeInsetsGeometry? titlePadding, bool automaticallyImplyLeading = true, double blurIntensity = 0.1, bool enableGradient = false, bool isLoading = false, IconData? loadingIcon}) -
Create a SmartAppBar with automatic route-based configuration
const
Properties
-
actions
→ List<
SmartAppBarAction> ? -
Optional custom actions (if not provided, will be determined by route)
final
- animationDuration → Duration
-
Animation duration
final
- automaticallyImplyLeading → bool
-
Whether to automatically infer leading widget
final
- backgroundColor → Color?
-
Custom background color override
final
- blurIntensity → double
-
Blur intensity for glass effects (0.0 to 1.0)
final
- centerTitle → bool
-
Whether to center the title
final
- elevation → double
-
Custom elevation for elevated variants
final
- enableAnimations → bool
-
Whether to enable animations
final
- enableGradient → bool
-
Whether to enable gradient backgrounds
final
- foregroundColor → Color?
-
Custom foreground (text/icon) color override
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLoading → bool
-
Loading state indicator
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingIcon → IconData?
-
Custom loading icon
final
- onBackPressed → VoidCallback?
-
Custom back button callback
final
- preferredSize → Size
-
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showBackButton → bool
-
Whether to show back button automatically
final
- title → String?
-
Optional custom title (if not provided, will be determined by route)
final
- titlePadding → EdgeInsetsGeometry?
-
Custom title padding
final
- variant → SmartAppBarVariant?
-
Optional custom variant (if not provided, will be determined by route)
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SmartAppBar> -
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
Static Methods
-
getDefaultConfig(
) → _RouteConfig - Get default configuration for unknown routes
-
getRouteConfig(
BuildContext context) → _RouteConfig? - Get current route configuration