copyWith method
Implementation
UserProfile copyWith({
String? id,
String? name,
String? photo,
String? platform,
String? token,
String? room,
bool clearRoom = false,
bool? newMessageAlerts,
bool? newRoomAlerts,
ProfileExtra? extra,
}) =>
UserProfile(
id: id ?? this.id,
name: name ?? this.name,
photo: photo ?? this.photo,
platform: platform ?? this.platform,
token: token ?? this.token,
room: clearRoom ? null : (room ?? this.room),
newMessageAlerts: newMessageAlerts ?? this.newMessageAlerts,
newRoomAlerts: newRoomAlerts ?? this.newRoomAlerts,
extra: extra ?? this.extra,
);