getInstanceByID method

F? getInstanceByID(
  1. String id
)

Returns a cached SharedObjectField instance by id.

Implementation

F? getInstanceByID(String id) {
  final ref = _fieldsInstances[id];
  if (ref == null) return null;

  final prev = ref.target;
  if (prev == null) {
    _fieldsInstances.remove(id);
    return null;
  }

  return prev;
}