change method Null safety

Metadata change(
  1. {PlatformSelector? testOn,
  2. Timeout? timeout,
  3. bool? skip,
  4. bool? verboseTrace,
  5. bool? chainStackTraces,
  6. int? retry,
  7. String? skipReason,
  8. Map<PlatformSelector, Metadata>? onPlatform,
  9. Set<String>? tags,
  10. Map<BooleanSelector, Metadata>? forTag,
  11. String? languageVersionComment}
)

Returns a copy of this with the given fields changed.

Implementation

Metadata change(
    {PlatformSelector? testOn,
    Timeout? timeout,
    bool? skip,
    bool? verboseTrace,
    bool? chainStackTraces,
    int? retry,
    String? skipReason,
    Map<PlatformSelector, Metadata>? onPlatform,
    Set<String>? tags,
    Map<BooleanSelector, Metadata>? forTag,
    String? languageVersionComment}) {
  testOn ??= this.testOn;
  timeout ??= this.timeout;
  skip ??= _skip;
  verboseTrace ??= _verboseTrace;
  chainStackTraces ??= _chainStackTraces;
  retry ??= _retry;
  skipReason ??= this.skipReason;
  onPlatform ??= this.onPlatform;
  tags ??= this.tags;
  forTag ??= this.forTag;
  languageVersionComment ??= this.languageVersionComment;
  return Metadata(
      testOn: testOn,
      timeout: timeout,
      skip: skip,
      verboseTrace: verboseTrace,
      chainStackTraces: chainStackTraces,
      skipReason: skipReason,
      onPlatform: onPlatform,
      tags: tags,
      forTag: forTag,
      retry: retry,
      languageVersionComment: languageVersionComment);
}