clearAll method Null safety

void clearAll()

Implementation

void clearAll() {
  List<String> keys = this.data.keys.toList();
  for (var key in keys) {
    if (this.data[key] is YekongaForm) {
      this.data[key].clearAll();
    } else {
      this.data[key] = null;
      if (this.clearFunctions.containsKey(key)) {
        this.clearFunctions[key]();
      }
    }
  }
}