SmartNavStyle class
A comprehensive style configuration class for custom navigation bars. This class provides customizable styling options for navigation components, including colors, borders, typography, animations, and layout properties. It also includes several predefined styles for common design patterns.
Constructors
-
Creates a SmartNavStyle with customizable properties.
All parameters have sensible defaults for a basic navigation bar style.
const
Properties
- animationCurve → Curve
-
The animation curve used for transition effects.
final
- animationDuration → Duration
-
The duration of animation effects.
final
- backgroundColor → Color
-
The background color of the navigation bar.
final
- backgroundGradient → Gradient?
-
The background gradient of the navigation bar (nullable).
final
- borderColor → Color?
-
The border color of the navigation bar (nullable).
final
- borderRadius → double
-
The border radius of the navigation bar corners.
final
- defaultActiveColor → Color
-
The default color for active navigation items.
final
- defaultActiveTextStyle → TextStyle
-
The default text style for active navigation items.
final
- defaultIconSize → double
-
The default size for navigation item icons.
final
- defaultInactiveColor → Color
-
The default color for inactive navigation items.
final
- defaultInactiveTextStyle → TextStyle
-
The default text style for inactive navigation items.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- margin → EdgeInsets
-
The margin around the navigation bar.
final
- padding → EdgeInsets
-
The padding inside the navigation bar.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleFactor → double
-
The scaling factor for animation effects on active items.
final
- showLabel → bool
-
Whether to show labels under navigation items.
final
Methods
-
copyWith(
{Color? backgroundColor, Gradient? backgroundGradient, Color? borderColor, double? borderRadius, EdgeInsets? margin, EdgeInsets? padding, Color? defaultActiveColor, Color? defaultInactiveColor, TextStyle? defaultActiveTextStyle, TextStyle? defaultInactiveTextStyle, double? defaultIconSize, double? scaleFactor, Curve? animationCurve, Duration? animationDuration, bool? showLabel}) → SmartNavStyle - Creates a copy of this style with the given fields replaced. Returns a new SmartNavStyle instance where non-null parameters replace the corresponding properties of the original style.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- gradientStyle ↔ SmartNavStyle
-
A gradient background style for the navigation bar with smooth animations.
getter/setter pair
Constants
- colorfulStyle → const SmartNavStyle
- A colorful style with vibrant hues and aquatic theme. Uses light blue background with teal accent colors and standard animations.
- minimalStyle → const SmartNavStyle
- A minimal style with transparent background and simple elements. Features no background or borders, with basic animations and hidden labels.
- neonStyle → const SmartNavStyle
- A neon-themed style with vibrant colors and elastic animations. Features a dark background with bright neon accent colors and pronounced animation effects.