clearField method

dynamic clearField(
  1. String key
)

Clear a field in the form

Implementation

clearField(String key) {
  if (!_data.containsKey(key)) {
    throw Exception("Field $key does not exist in the form");
  }
  _data[key] = null;
  NyForm.stateRefresh(stateName);
}