registerAttribute<T> method
Implementation
void registerAttribute<T>(DraftModeFormAttribute<T> attribute) {
final key = identityHashCode(attribute);
_attributes[key] = attribute;
_drafts.putIfAbsent(key, () => attribute.value);
_committed.putIfAbsent(key, () => attribute.value);
final definition = attribute.definition;
if (definition != null) {
_definitionAttributes.putIfAbsent(
identityHashCode(definition),
() => attribute,
);
}
}