copyWith method

UserInfoResponse copyWith({
  1. String? sub,
  2. int? id,
  3. String? battleTag,
})

Returns a copy of this instance with the given fields replaced by new values.

If a field is not provided, the existing value is retained.

Implementation

UserInfoResponse copyWith({String? sub, int? id, String? battleTag}) =>
    UserInfoResponse(
      sub: sub ?? this.sub,
      id: id ?? this.id,
      battleTag: battleTag ?? this.battleTag,
    );