ImageExtension class

Inheritance

Constructors

ImageExtension({AssetBundle? assetBundle, String? assetPackage, String assetSchema = "asset:", String? dataEncoding, Set<String>? fileExtensions, Set<String>? mimeTypes, Set<String>? networkDomains, Map<String, String>? networkHeaders, Set<String> networkSchemas = const {"http", "https"}, bool handleAssetImages = true, bool handleDataImages = true, bool handleNetworkImages = true, Widget? child, Widget builder(ExtensionContext)?})
ImageExtension allows you to extend the built-in support by providing a custom way to render a specific selection of attributes or providing headers or asset package/bundle specifications.
ImageExtension.inline({AssetBundle? assetBundle, String? assetPackage, String assetSchema = "asset:", String? dataEncoding, Set<String>? fileExtensions, Set<String>? mimeTypes, Set<String>? networkDomains, Map<String, String>? networkHeaders, Set<String> networkSchemas = const {"http", "https"}, bool handleAssetImages = true, bool handleDataImages = true, bool handleNetworkImages = true, InlineSpan? child, InlineSpan builder(ExtensionContext)?})
See ImageExtension. The only difference is that this method allows you to directly pass an InlineSpan through child or builder, allowing you to construct more seamless extensions.

Properties

assetBundle AssetBundle?
finalinherited
assetPackage String?
finalinherited
assetSchema String
finalinherited
builder ↔ (InlineSpan Function(ExtensionContext)?)
latefinal
dataEncoding String?
finalinherited
fileExtensions Set<String>?
finalinherited
handleAssetImages bool
finalinherited
handleDataImages bool
finalinherited
handleNetworkImages bool
finalinherited
hashCode int
The hash code for this object.
no setterinherited
mimeTypes Set<String>?
finalinherited
networkDomains Set<String>?
finalinherited
networkHeaders Map<String, String>?
finalinherited
networkSchemas Set<String>
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedTags Set<String>
Tells the HtmlParser what additional tags to add to the default supported tag list (the extension's user can still override this by setting an explicit tagList on the Html widget).
no setterinherited

Methods

beforeProcessing(ExtensionContext context) → void
Called after styling, but before extra elements/whitespace has been removed, margins collapsed, list characters processed, or relative values calculated. Default behavior: do nothing;
inherited
beforeStyle(ExtensionContext context) → void
Called before styles are applied to the tree. Default behavior: do nothing;
inherited
build(ExtensionContext context) InlineSpan
The final step in the chain. Converts the StyledElement tree, with its attached Style elements, into an InlineSpan tree that includes Widget/TextSpans that can be rendered in a RichText widget.
matches(ExtensionContext context) bool
This method is called to test whether or not this extension needs to do any work in this context.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose() → void
Called when the Html widget is being destroyed. This would be a very good place to dispose() any controllers or free any resources that the extension uses. Default behavior: do nothing.
inherited
prepare(ExtensionContext context, List<StyledElement> children) StyledElement
Converts parsed HTML to a StyledElement.
inherited
toString() String
A string representation of this object.
inherited

Operators

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