copyWith method
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,
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,
);
}