copyWith method

FloatyTab copyWith({
  1. bool? isSelected,
  2. String? title,
  3. TextStyle? titleStyle,
  4. Widget? icon,
  5. VoidCallback? onTap,
  6. FloatyActionButton? floatyActionButton,
  7. EdgeInsetsGeometry? margin,
  8. Color? selectedColor,
  9. Color? unselectedColor,
})

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

This method allows you to create a new FloatyTab 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

FloatyTab copyWith({
  bool? isSelected,
  String? title,
  TextStyle? titleStyle,
  Widget? icon,
  VoidCallback? onTap,
  FloatyActionButton? floatyActionButton,
  EdgeInsetsGeometry? margin,
  Color? selectedColor,
  Color? unselectedColor,
}) {
  return FloatyTab(
    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,
  );
}