$createImageNode function

ImageNode $createImageNode({
  1. required String src,
  2. String altText = '',
  3. double width = 0,
  4. double height = 0,
  5. double maxWidth = ImageNode.defaultMaxWidth,
  6. bool showCaption = false,
  7. Map<String, Object?>? caption,
})

Creates an image, applying any registered node replacement.

Implementation

ImageNode $createImageNode({
  required String src,
  String altText = '',
  double width = 0,
  double height = 0,
  double maxWidth = ImageNode.defaultMaxWidth,
  bool showCaption = false,
  Map<String, Object?>? caption,
}) => $applyNodeReplacement(
  ImageNode(
    src: src,
    altText: altText,
    width: width,
    height: height,
    maxWidth: maxWidth,
    showCaption: showCaption,
    caption: caption,
  ),
);