copyWith method

UnsupportedProtocolVersionErrorErrorData copyWith({
  1. String? requested,
  2. List<String>? supported,
})

A copy with the given properties replaced; everything else, unknown keys included, is kept.

Implementation

UnsupportedProtocolVersionErrorErrorData copyWith({
  String? requested,
  List<String>? supported,
}) =>
    UnsupportedProtocolVersionErrorErrorData.fromJson({
      ...toJson(),
      if (requested != null) 'requested': $encode(requested),
      if (supported != null) 'supported': $encode(supported),
    });