toHtml method

  1. @override
String toHtml()
override

Render to HTML (for emails, web)

Implementation

@override
String toHtml() {
  final imageHtml = _buildImageHtml();

  if (linkUrl != null) {
    return _buildImageWithLink(imageHtml);
  }

  if (caption != null) {
    return _buildImageWithCaption(imageHtml);
  }

  return _wrapWithContainer(imageHtml);
}