enableEditor method

void enableEditor(
  1. bool enable
)

enableEditor method is used to enable/ disable the editor, while, we can enable or disable the editor directly by passing isEnabled to the widget, this is an additional function that can be used to do the same with the state key We can choose either of these ways to enable/disable

Implementation

void enableEditor(bool enable) async {
  isEnable = enable;
  await _editorKey?.currentState?._enableTextEditor(isEnabled: enable);
}