setCustomBlocks method

void setCustomBlocks(
  1. List<CustomHtmlPart> customBlocks, {
  2. bool overrideCurrentBlocks = false,
})

Sets custom HTML parts to extend the conversion capabilities.

Parameters:

  • customBlocks: List of custom HTML parts to add.
  • overrideCurrentBlocks: Flag to override existing custom blocks.

Implementation

void setCustomBlocks(List<CustomHtmlPart> customBlocks,
    {bool overrideCurrentBlocks = false}) {
  if (this.customBlocks != null && !overrideCurrentBlocks) {
    this.customBlocks!.addAll(customBlocks);
    return;
  }
  this.customBlocks = [...customBlocks];
}