insertVideo method
Inserts a video block at or after blockIndex.
Implementation
int insertVideo({
required String src,
String? caption,
double? width,
double? height,
String? poster,
SmartTextAlign alignment = SmartTextAlign.center,
int? blockIndex,
}) {
final targetIndex = blockIndex ?? _editorWidgetState?.focusedBlockIndex;
final index = _documentController.insertVideo(
src: src,
caption: caption,
width: width,
height: height,
poster: poster,
alignment: alignment,
blockIndex: targetIndex,
);
_editorWidgetState?.rebuild();
return index;
}