copyWith method

TitledSingleSelectEnumSchemaOneOfItem copyWith({
  1. String? constValue,
  2. String? title,
})

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

Implementation

TitledSingleSelectEnumSchemaOneOfItem copyWith({
  String? constValue,
  String? title,
}) =>
    TitledSingleSelectEnumSchemaOneOfItem.fromJson({
      ...toJson(),
      if (constValue != null) 'const': $encode(constValue),
      if (title != null) 'title': $encode(title),
    });