copyWith method

NavBarEssentials copyWith({
  1. int? selectedIndex,
  2. int? previousIndex,
  3. double? iconSize,
  4. Color? backgroundColor,
  5. List<PersistentBottomNavBarItem>? items,
  6. ValueChanged<int>? onItemSelected,
  7. double? navBarHeight,
  8. NavBarPadding? padding,
  9. dynamic popAllScreensForTheSelectedTab(
    1. int
    )?,
  10. bool? popScreensOnTapOfSelectedTab,
  11. ItemAnimationProperties? itemAnimationProperties,
})

Implementation

NavBarEssentials copyWith({
  int? selectedIndex,
  int? previousIndex,
  double? iconSize,
  Color? backgroundColor,
  List<PersistentBottomNavBarItem>? items,
  ValueChanged<int>? onItemSelected,
  double? navBarHeight,
  NavBarPadding? padding,
  Function(int)? popAllScreensForTheSelectedTab,
  bool? popScreensOnTapOfSelectedTab,
  ItemAnimationProperties? itemAnimationProperties,
}) {
  return NavBarEssentials(
    selectedIndex: selectedIndex ?? this.selectedIndex,
    previousIndex: previousIndex ?? this.previousIndex,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    items: items ?? this.items,
    onItemSelected: onItemSelected ?? this.onItemSelected,
    navBarHeight: navBarHeight ?? this.navBarHeight,
    padding: padding ?? this.padding,
    popScreensOnTapOfSelectedTab:
        popScreensOnTapOfSelectedTab ?? this.popScreensOnTapOfSelectedTab,
    itemAnimationProperties:
        itemAnimationProperties ?? this.itemAnimationProperties,
  );
}