of static method
Implementation
static AnchorKey? of(Key? parentKey, StyledElement? id) {
final key = forId(parentKey, id?.elementId);
if (key == null || _registry.contains(key)) {
// Invalid id or already created a key with this id: silently ignore
return null;
}
_registry.add(key);
return key;
}