copyWith method

ResourceReference copyWith({
  1. String? uri,
})

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

Implementation

ResourceReference copyWith({
  String? uri,
}) =>
    ResourceReference.fromJson({
      ...toJson(),
      if (uri != null) 'uri': $encode(uri),
    });