copyWith method
Creates a copy of this user with the given fields replaced with new values
Implementation
ChatUser copyWith({
String? id,
String? name,
String? firstName,
String? avatar,
Map<String, dynamic>? customProperties,
String? role,
}) =>
ChatUser(
id: id ?? this.id,
name: name ?? firstName ?? this.name,
avatar: avatar ?? this.avatar,
customProperties: customProperties ?? this.customProperties,
role: role ?? this.role,
);