copyWith method

Annotated copyWith({
  1. AnnotatedAnnotations? annotations,
})

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

Implementation

Annotated copyWith({
  AnnotatedAnnotations? annotations,
}) =>
    Annotated.fromJson({
      ...toJson(),
      if (annotations != null) 'annotations': $encode(annotations),
    });