ZdsHtmlContainer class

A container widget for displaying HTML content with optional features.

This widget can display HTML content with options for text expansion, setting font size, displaying a "Read More" link, and handling links. It also transforms media tags to audio/video tags and iframe tags to href links.

Inheritance
Available extensions

Constructors

ZdsHtmlContainer(String htmlText, {Key? key, bool expanded = false, double? fontSize, bool showReadMore = true, void onLinkTap(String? url, Map<String, String> attributes, Element? element)?, double containerHeight = 200, Map<String, HtmlExtension> extensions = const {}, Map<String, Style> style = const {}})
Creates a new instance of the ZdsHtmlContainer widget.
const

Properties

containerHeight double
Height of Html Container
final
expanded bool
Determines whether the text is initially expanded. Defaults to false.
final
extensions Map<String, HtmlExtension>
Add custom extensions to override the existing ones Following can be overridden tableTagWrap, tableHtml, video, audio, svg, img, loader, nestedTable, mediaContainer
final
fontSize double?
The font size for the HTML content. If null, the default font size is used.
final
hashCode int
The hash code for this object.
no setterinherited
htmlText String
The HTML content to be displayed.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onLinkTap → void Function(String? url, Map<String, String> attributes, Element? element)?
A callback function that is called when a link is tapped within the HTML content.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showReadMore bool
Controls the visibility of the "Read More" link. Defaults to true.
final
style Map<String, Style>
An API that allows you to override the default style for any HTML element
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ZdsHtmlContainer>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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