updateAttribute<T> method

void updateAttribute<T>(
  1. DraftModeFormAttribute<T> attribute,
  2. T? value
)

Implementation

void updateAttribute<T>(DraftModeFormAttribute<T> attribute, T? value) {
  final key = identityHashCode(attribute);
  if (!_drafts.containsKey(key)) {
    registerAttribute(attribute);
  }
  _drafts[key] = attribute.mapValue(value);
}