internalCheckAddKeyedObject method Null safety

bool internalCheckAddKeyedObject(
  1. KeyedObject object
)

Implementation

bool internalCheckAddKeyedObject(KeyedObject object) {
  var value = _keyedObjects[object.objectId];

  // If the object is already keyed, that's ok just make sure the KeyedObject
  // matches.
  if (value != null && value != object) {
    return false;
  }
  return true;
}