TransformConfiguration class

Contains the configuration for all transformations.

Constructors

TransformConfiguration({required List<DomTransformer> domTransformers, required List<TextTransformer> textTransformers, int? maxImageWidth, bool blockExternalImages = false, bool preferPlainText = false, bool enableDarkMode = false, String emptyMessageText = standardEmptyMessageText, String plainTextHtmlTemplate = standardPlainTextHtmlTemplate, Map<String, dynamic>? customValues})
Creates a new transform configuration
const
TransformConfiguration.create({bool blockExternalImages = false, bool enableDarkMode = false, bool preferPlainText = false, String? emptyMessageText, int? maxImageWidth = standardMaxImageWidth, String plainTextHtmlTemplate = standardPlainTextHtmlTemplate, List<DomTransformer>? customDomTransformers, List<TextTransformer>? customTextTransformers, Map<String, dynamic>? customValues})
Provides an easy option to customize a configuration.
factory

Properties

blockExternalImages bool
Should external images be blocked?
final
customValues Map<String, dynamic>?
Optional custom values, null unless specified.
final
domTransformers List<DomTransformer>
The list of DOM transformers being used
final
emptyMessageText String
The text that should be displayed in an otherwise empty message.
final
enableDarkMode bool
Should a dark mode be enabled? This might be required for devices with older browser versions
final
hashCode int
The hash code for this object.
no setterinherited
maxImageWidth int?
The maximum width for embedded images. It make sense to limit this to reduce the generated HTML size.
final
plainTextHtmlTemplate String
The template for converting a plain text message into a HTML document.
final
preferPlainText bool
Should the plain text be used instead of the HTML text?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textTransformers List<TextTransformer>
The list of text transformers that are used before a plain text message without HTML part is converted into HTML
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

standardConfiguration → const TransformConfiguration
Provides easy access to a standard configuration that does not block external images.
standardDomTransformers → const List<DomTransformer>
The list of default DOM transformers
standardEmptyMessageText → const String
Default (English) empty message text
standardMaxImageWidth → const int?
The standard maximum image width is null, ie not restricted.
standardPlainTextHtmlTemplate → const String
Embeds the plain text in a paragraph <p>{text}</p>
standardTextTransformers → const List<TextTransformer>
The list of default text transformers