fromID method

F fromID(
  1. String id, {
  2. R? reference,
})

Creates a SharedObjectField with id.

Implementation

F fromID(String id, {R? reference}) {
  var ref = _fieldsInstances[id];
  if (ref != null) {
    var o = ref.target;
    if (o != null) return o;
  }

  var o = fieldInstantiator(id, sharedObjectReference: reference);
  assert(identical(o, _fieldsInstances[id]?.target));
  return o;
}