HtmlParser class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- HtmlParser
Constructors
-
HtmlParser({required Key? key, required Document htmlData, required OnTap? onLinkTap, required OnTap? onAnchorTap, required OnTap? onImageTap, required OnCssParseError? onCssParseError, required ImageErrorListener? onImageError, required OnMathError? onMathError, required bool shrinkWrap, required bool selectable, required Map<
String, Style> style, required Map<String, CustomRender> customRender, required Map<ImageSourceMatcher, ImageRender> imageRenders, required List<String> tagsList, TextSelectionControls? selectionControls, ScrollPhysics? scrollPhysics})
Properties
-
cachedImageSizes
→ Map<
String, Size> -
final
-
customRender
→ Map<
String, CustomRender> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- htmlData → Document
-
final
-
imageRenders
→ Map<
ImageSourceMatcher, ImageRender> -
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
final
-
final
- onAnchorTap → OnTap?
-
final
- onCssParseError → OnCssParseError?
-
final
- onImageError → ImageErrorListener?
-
final
- onImageTap → OnTap?
-
final
- onLinkTap → OnTap?
-
final
- onMathError → OnMathError?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollPhysics → ScrollPhysics?
-
final
- selectable → bool
-
final
- selectionControls → TextSelectionControls?
-
final
- shrinkWrap → bool
-
final
-
style
→ Map<
String, Style> -
final
-
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseTree(
RenderContext context, StyledElement tree) → InlineSpan - parseTree converts a tree of StyledElements to an InlineSpan tree.
-
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, int wrapWidth = 65}) → 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
Static Methods
-
cleanTree(
StyledElement tree) → StyledElement -
cleanTree optimizes the StyledElement tree so all
BlockElement
s are on the first level, redundant levels are collapsed, empty elements are removed, and specialty elements are processed. -
lexDomTree(
Document html, List< String> customRenderTags, List<String> tagsList, BuildContext context) → StyledElement - lexDomTree converts a DOM document to a simplified tree of StyledElements.
-
parseCss(
String data) → StyleSheet -
parseCss converts a string of CSS to a CSS stylesheet using the dart
csslib
library. -
parseHTML(
String data) → Document -
parseHTML converts a string of HTML to a DOM document using the dart
html
library.