insertTable method

void insertTable({
  1. int rows = 2,
  2. int cols = 2,
})

Inserts a new table after the currently focused block.

Implementation

void insertTable({int rows = 2, int cols = 2}) {
  final blockIndex = _editorWidgetState?.focusedBlockIndex ?? 0;
  _documentController.insertTable(blockIndex, rows: rows, cols: cols);
  _editorWidgetState?.rebuild();
}