clear method

void clear()

Implementation

void clear() {
  emit(state.copyWith(
    data: {},
    initialData: {},
  ));
  for (final TextEditingController controller in state.controllerMap.values) {
    controller.clear();
  }
  updateValue('', null);
  onDataChanged?.call(state.data);
}