yTextInsertEmbed method

void yTextInsertEmbed({
  1. required YText ref,
  2. required int index_,
  3. required JsonValueItem embed,
  4. TextAttrs? attributes,
  5. YTransaction? txn,
})

Implementation

void yTextInsertEmbed({
  required YText ref,
  required int /*U32*/ index_,
  required JsonValueItem embed,
  TextAttrs? attributes,
  YTransaction? txn,
}) {
  _yTextInsertEmbed([
    ref.toWasm(),
    index_,
    embed.toWasm(),
    (attributes == null
        ? const None().toWasm()
        : Option.fromValue(attributes).toWasm((some) => some.toWasm())),
    (txn == null
        ? const None().toWasm()
        : Option.fromValue(txn).toWasm(YTransaction.toWasm))
  ]);
}