gradientStyle property

SmartNavStyle gradientStyle
getter/setter pair

A gradient background style for the navigation bar with smooth animations.

Implementation

static SmartNavStyle gradientStyle = SmartNavStyle(
  backgroundGradient: const LinearGradient(
    colors: [Colors.deepPurpleAccent, Colors.pinkAccent],
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
    stops: [0.3, 1.0], // Adjusting stops for a smoother gradient transition
  ),
  backgroundColor: Colors.transparent, // Transparent to show gradient
  borderColor: Colors.transparent,
  borderRadius: 30.0, // Soft, rounded corners for a modern look
  margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
  padding: const EdgeInsets.all(5),
  defaultActiveColor: Colors.white,
  defaultInactiveColor: Colors.grey[400]!,
  defaultActiveTextStyle: const TextStyle(
    fontSize: 14, // Slightly larger font for clarity
    fontWeight: FontWeight.bold, // Bold text for active items
    color: Colors.white,
    letterSpacing: 0.5, // Small letter spacing for better readability
  ),
  defaultInactiveTextStyle: const TextStyle(
    fontSize: 14, // Consistent size with active text
    fontWeight: FontWeight.w400,
    color: Color(0xFFCCCCCC),
    letterSpacing: 0.3, // Small letter spacing for consistency
  ),
  defaultIconSize: 28.0, // Slightly larger icons for better visibility
  scaleFactor: 1.2, // A bit more pronounced scale effect for active items
  animationCurve: Curves.easeOut, // Smooth easing for fluid transitions
  animationDuration: const Duration(
      milliseconds: 400), // Slightly longer animation for smoother effect
  showLabel: true,
);