insertText method

void insertText(
  1. String text
)

Inserts plain text at the current cursor position.

Implementation

void insertText(String text) {
  final blockIndex = _editorWidgetState?.focusedBlockIndex ?? 0;
  final offset = _editorWidgetState?.cursorOffset ?? 0;
  _documentController.insertText(blockIndex, offset, text);
  _editorWidgetState?.rebuild();
}