copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
ModelPreferences copyWith({
num? costPriority,
List<ModelHint>? hints,
num? intelligencePriority,
num? speedPriority,
}) =>
ModelPreferences.fromJson({
...toJson(),
if (costPriority != null) 'costPriority': $encode(costPriority),
if (hints != null) 'hints': $encode(hints),
if (intelligencePriority != null) 'intelligencePriority': $encode(intelligencePriority),
if (speedPriority != null) 'speedPriority': $encode(speedPriority),
});