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