copyWith method

PersistentBottomNavBar copyWith({
  1. int? selectedIndex,
  2. double? iconSize,
  3. int? previousIndex,
  4. Color? backgroundColor,
  5. Duration? animationDuration,
  6. List<PersistentBottomNavBarItem>? items,
  7. ValueChanged<int>? onItemSelected,
  8. double? navBarHeight,
  9. EdgeInsets? margin,
  10. NavBarStyle? navBarStyle,
  11. double? horizontalPadding,
  12. NeumorphicProperties? neumorphicProperties,
  13. Widget customNavBarWidget(
    1. NavBarEssentials
    )?,
  14. dynamic popAllScreensForTheSelectedTab(
    1. int
    )?,
  15. bool? popScreensOnTapOfSelectedTab,
  16. NavBarDecoration? navBarDecoration,
  17. NavBarEssentials? navBarEssentials,
  18. bool? confineToSafeArea,
  19. ItemAnimationProperties? itemAnimationProperties,
  20. Function? onAnimationComplete,
  21. bool? hideNavigationBar,
  22. bool? isCustomWidget,
  23. EdgeInsets? padding,
})

Implementation

PersistentBottomNavBar copyWith(
    {int? selectedIndex,
    double? iconSize,
    int? previousIndex,
    Color? backgroundColor,
    Duration? animationDuration,
    List<PersistentBottomNavBarItem>? items,
    ValueChanged<int>? onItemSelected,
    double? navBarHeight,
    EdgeInsets? margin,
    NavBarStyle? navBarStyle,
    double? horizontalPadding,
    NeumorphicProperties? neumorphicProperties,
    Widget Function(NavBarEssentials)? customNavBarWidget,
    Function(int)? popAllScreensForTheSelectedTab,
    bool? popScreensOnTapOfSelectedTab,
    NavBarDecoration? navBarDecoration,
    NavBarEssentials? navBarEssentials,
    bool? confineToSafeArea,
    ItemAnimationProperties? itemAnimationProperties,
    Function? onAnimationComplete,
    bool? hideNavigationBar,
    bool? isCustomWidget,
    EdgeInsets? padding}) {
  return PersistentBottomNavBar(
      confineToSafeArea: confineToSafeArea ?? this.confineToSafeArea,
      margin: margin ?? this.margin,
      neumorphicProperties: neumorphicProperties ?? this.neumorphicProperties,
      navBarStyle: navBarStyle ?? this.navBarStyle,
      hideNavigationBar: hideNavigationBar ?? this.hideNavigationBar,
      customNavBarWidget: customNavBarWidget ?? this.customNavBarWidget,
      onAnimationComplete: onAnimationComplete as dynamic Function(bool, bool)? ?? this.onAnimationComplete,
      navBarEssentials: navBarEssentials ?? this.navBarEssentials,
      isCustomWidget: isCustomWidget ?? this.isCustomWidget,
      navBarDecoration: navBarDecoration ?? this.navBarDecoration);
}