insert method

void insert(
  1. int index,
  2. String text, {
  3. Map<String, dynamic>? attributes,
})

Implementation

void insert(int index, String text, {Map<String, dynamic>? attributes}) {
  doc.sendChanges({
    "documentID": doc.id,
    "changes": [
      {
        "nodeID": parent!.id,
        "insertText": {"index": index, "text": text, "attributes": attributes ?? {}},
      },
    ],
  });
}