Html class
Drop-in replacement for flutter_html's Html widget.
This widget provides high-performance rendering via HyperRender's
custom RenderObject engine while exposing a familiar API surface for
applications migrating from flutter_html.
Migration (Single Line Change)
// Before:
// import 'package:flutter_html/flutter_html.dart';
// After:
import 'package:hyper_render/compat/flutter_html.dart';
Html(
data: '<h1>Hello World</h1>',
onLinkTap: (url, attributes, element) => print(url),
)
- Inheritance
- Available extensions
Constructors
Properties
- customWidgetBuilder → HyperWidgetBuilder?
-
Custom tag builders / widget interceptors.
final
- data → String?
-
The raw HTML string to render.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onError → Widget Function(BuildContext context, Object error)?
-
Error builder callback.
final
- onLinkTap → OnLinkTap?
-
Callback when an
<a>link is tapped.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectable → bool
-
Selection support toggle.
final
- shrinkWrap → bool?
-
Whether the rendered document should be selectable.
final
-
style
→ Map<
String, dynamic> ? -
Custom inline CSS stylesheet map: selector -> Style or CSS string.
final
Methods
-
bounce(
{Duration duration = const Duration(milliseconds: 1000), int? iterationCount}) → Widget -
Available on Widget, provided by the HyperAnimationExtension extension
Apply a bounce animation -
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
-
fadeIn(
{Duration duration = const Duration(milliseconds: 300), Duration delay = Duration.zero, Curve curve = Curves.ease}) → Widget -
Available on Widget, provided by the HyperAnimationExtension extension
Apply a fade in animation -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pulse(
{Duration duration = const Duration(milliseconds: 1000), int? iterationCount}) → Widget -
Available on Widget, provided by the HyperAnimationExtension extension
Apply a pulse animation -
slideInLeft(
{Duration duration = const Duration(milliseconds: 300), Duration delay = Duration.zero, Curve curve = Curves.ease}) → Widget -
Available on Widget, provided by the HyperAnimationExtension extension
Apply a slide in from left animation -
spin(
{Duration duration = const Duration(milliseconds: 1000), int? iterationCount}) → Widget -
Available on Widget, provided by the HyperAnimationExtension extension
Apply a spin animation -
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