copyWith method

UserProfile copyWith({
  1. String? id,
  2. String? name,
  3. String? photo,
  4. String? platform,
  5. String? token,
  6. String? room,
  7. bool clearRoom = false,
  8. bool? newMessageAlerts,
  9. bool? newRoomAlerts,
  10. ProfileExtra? extra,
})

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,
);