replaceAttribute<T> method

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

Implementation

void replaceAttribute<T>(DraftModeFormAttribute<T> attribute, T? value) {
  final mapped = attribute.mapValue(value);
  attribute.value = mapped;
  registerAttribute(attribute);
  final key = identityHashCode(attribute);
  _drafts[key] = mapped;
  _committed[key] = mapped;
}