copyWith method

ModelHint copyWith({
  1. String? name,
})

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

Implementation

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