copyWith method

FloaticaTab copyWith({
  1. bool? isSelected,
  2. String? title,
  3. TextStyle? titleStyle,
  4. Widget? icon,
  5. VoidCallback? onTap,
  6. FloaticaActionButton? floatyActionButton,
  7. EdgeInsetsGeometry? margin,
  8. Color? selectedColor,
  9. Color? unselectedColor,
  10. FloaticaTabDisplayMode? selectedDisplayMode,
  11. FloaticaTabDisplayMode? unselectedDisplayMode,
  12. Gradient? selectedGradient,
  13. Gradient? unselectedGradient,
  14. Widget? badge,
  15. double? iconSize,
  16. double? selectedIconSize,
  17. FloaticaLabelPosition? labelPosition,
  18. FloaticaIndicatorStyle? indicatorStyle,
  19. Color? indicatorColor,
  20. Color? borderColor,
  21. double? borderWidth,
  22. Duration? animationDuration,
  23. Curve? animationCurve,
  24. bool? enableHaptics,
  25. String? tooltip,
  26. FloaticaGlassEffect? glassEffect,
  27. double? width,
  28. double? height,
})

Creates a copy of the current FloaticaTab instance with optional modifications.

This method allows you to create a new FloaticaTab while preserving the current state, and selectively updating properties such as isSelected, title, titleStyle, icon, onTap, floatyActionButton, margin, selectedColor, and unselectedColor. If a property is not provided, the original value from the current instance will be used.

Implementation

FloaticaTab copyWith({
  bool? isSelected,
  String? title,
  TextStyle? titleStyle,
  Widget? icon,
  VoidCallback? onTap,
  FloaticaActionButton? floatyActionButton,
  EdgeInsetsGeometry? margin,
  Color? selectedColor,
  Color? unselectedColor,
  FloaticaTabDisplayMode? selectedDisplayMode,
  FloaticaTabDisplayMode? unselectedDisplayMode,
  Gradient? selectedGradient,
  Gradient? unselectedGradient,
  Widget? badge,
  double? iconSize,
  double? selectedIconSize,
  FloaticaLabelPosition? labelPosition,
  FloaticaIndicatorStyle? indicatorStyle,
  Color? indicatorColor,
  Color? borderColor,
  double? borderWidth,
  Duration? animationDuration,
  Curve? animationCurve,
  bool? enableHaptics,
  String? tooltip,
  FloaticaGlassEffect? glassEffect,
  double? width,
  double? height,
}) {
  return FloaticaTab(
    isSelected: isSelected ?? this.isSelected,
    title: title ?? this.title,
    titleStyle: titleStyle ?? this.titleStyle,
    icon: icon ?? this.icon,
    onTap: onTap ?? this.onTap,
    floatyActionButton: floatyActionButton ?? this.floatyActionButton,
    margin: margin ?? this.margin,
    selectedColor: selectedColor ?? this.selectedColor,
    unselectedColor: unselectedColor ?? this.unselectedColor,
    selectedDisplayMode: selectedDisplayMode ?? this.selectedDisplayMode,
    unselectedDisplayMode:
        unselectedDisplayMode ?? this.unselectedDisplayMode,
    selectedGradient: selectedGradient ?? this.selectedGradient,
    unselectedGradient: unselectedGradient ?? this.unselectedGradient,
    badge: badge ?? this.badge,
    iconSize: iconSize ?? this.iconSize,
    selectedIconSize: selectedIconSize ?? this.selectedIconSize,
    labelPosition: labelPosition ?? this.labelPosition,
    indicatorStyle: indicatorStyle ?? this.indicatorStyle,
    indicatorColor: indicatorColor ?? this.indicatorColor,
    borderColor: borderColor ?? this.borderColor,
    borderWidth: borderWidth ?? this.borderWidth,
    animationDuration: animationDuration ?? this.animationDuration,
    animationCurve: animationCurve ?? this.animationCurve,
    enableHaptics: enableHaptics ?? this.enableHaptics,
    tooltip: tooltip ?? this.tooltip,
    glassEffect: glassEffect ?? this.glassEffect,
    width: width ?? this.width,
    height: height ?? this.height,
  );
}