copyWith method
CPBarButton
copyWith({
- String? title,
- String? image,
- bool? isEnabled,
- CPBarButtonStyles? style,
- OnClickEvents? onClickEvent,
Creates a copy of this object but with the given fields replaced with new values.
Implementation
CPBarButton copyWith({
String? title,
String? image,
bool? isEnabled,
CPBarButtonStyles? style,
OnClickEvents? onClickEvent,
}) {
return CPBarButton(
title: title ?? this.title,
image: image ?? this.image,
style: style ?? this.style,
onClickEvent: onClickEvent ?? this.onClickEvent,
isEnabled: isEnabled ?? this.isEnabled,
);
}