withFieldResource<T2 extends Resource> method
T
withFieldResource<T2 extends Resource>(
- FieldDefinition<
T2> field, - T2 resource, {
- required T constructor(
- JsonObject
Creates a clone of the resource with the provided field updated with another resource
Implementation
T withFieldResource<T2 extends Resource>(
FieldDefinition<T2> field,
T2 resource, {
required T Function(JsonObject) constructor,
}) =>
constructor(json.withUpdate(field.name, resource.json));