copyWith method

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

Implementation

HeaderMismatchError copyWith({
  HeaderMismatchErrorError? error,
  Object? id,
}) =>
    HeaderMismatchError.fromJson({
      ...toJson(),
      if (error != null) 'error': $encode(error),
      if (id != null) 'id': $encode(id),
    });