WidgetFactory class

A factory to build widgets with WebView, VideoPlayer, etc.

Available Extensions

Constructors

WidgetFactory()

Properties

cacheManager → dynamic
Uses a custom cache manager.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
svgAllowDrawingOutsideViewBox bool
Controls whether the SVG can be drawn outside of the clip boundary of its view box. See SvgPicture.allowDrawingOutsideViewBox for more information.
no setterinherited
webView bool
Controls whether IFRAME is rendered as WebView.
no setterinherited
webViewDebuggingEnabled bool
Controls whether debugging is enabled.
no setterinherited
webViewJs bool
Controls whether to enable JavaScript.
no setterinherited
webViewMediaPlaybackAlwaysAllow bool
Controls whether to always allow media playback.
no setterinherited
webViewOnAndroidHideCustomWidget → (void Function()?)
Sets the callback that is invoked when the host application wants to hide a custom widget.
no setterinherited
webViewOnAndroidShowCustomWidget → (void Function(Widget widget)?)
Sets the callback that is invoked when the host application wants to show a custom widget. The most common use case this method is invoked a video element wants to be displayed in fullscreen.
no setterinherited
webViewUserAgent String?
The value used for the HTTP User-Agent request header.
no setterinherited

Methods

buildAlign(BuildTree tree, Widget child, AlignmentGeometry alignment, {double? heightFactor, double? widthFactor}) Widget?
Builds Align.
inherited
buildAnchorBodyItem(BuildContext context, int index, Widget widget) Widget
inherited
buildAspectRatio(BuildTree tree, Widget child, double aspectRatio) Widget?
Builds AspectRatio.
inherited
buildAudioPlayer(BuildMetadata meta, String url, {required bool autoplay, required bool loop, required bool muted, required bool preload}) Widget?
Builds AudioPlayer.
inherited
buildBodyWidget(BuildContext context, Widget child) Widget
Builds body widget.
inherited
buildColumnPlaceholder(BuildTree tree, Iterable<WidgetPlaceholder> children) WidgetPlaceholder?
Builds column placeholder.
inherited
buildColumnWidget(BuildContext context, List<Widget> children, {CrossAxisAlignment? crossAxisAlignment, TextDirection? dir}) Widget
Builds Column.
inherited
buildDecoration(BuildTree tree, Widget child, {BoxBorder? border, BorderRadius? borderRadius, Color? color, DecorationImage? image}) Widget?
Builds Decoration.
inherited
buildDecorationImage(BuildTree tree, String? url, {AlignmentGeometry alignment = Alignment.topLeft, BoxFit fit = BoxFit.scaleDown, ImageRepeat repeat = ImageRepeat.noRepeat}) DecorationImage?
Builds decoration image from url
inherited
buildFlex(BuildTree tree, List<Widget> children, {CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center, required Axis direction, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, TextBaseline textBaseline = TextBaseline.alphabetic, TextDirection textDirection = TextDirection.ltr}) Widget?
Builds Flex.
inherited
buildGestureDetector(BuildTree tree, Widget child, GestureRecognizer recognizer) Widget?
Builds GestureDetector.
inherited
buildGestureRecognizer(BuildTree tree, {GestureTapCallback? onTap}) GestureRecognizer?
Builds GestureRecognizer.
inherited
buildHorizontalScrollView(BuildTree tree, Widget child) Widget?
Builds horizontal scroll view.
inherited
buildImage(BuildTree tree, ImageMetadata data) Widget?
Builds image widget from an ImageMetadata.
inherited
buildImageWidget(BuildMetadata meta, ImageSource src) Widget?
Builds Image.
inherited
buildListMarker(BuildTree tree, InheritedProperties resolved, String listStyleType, int index) Widget?
Builds marker widget for a list item.
inherited
buildPadding(BuildTree tree, Widget child, EdgeInsetsGeometry padding) Widget?
Builds Padding.
inherited
buildText(BuildTree tree, InheritedProperties resolved, InlineSpan text) Widget?
Builds RichText.
inherited
buildTextSpan({List<InlineSpan>? children, GestureRecognizer? recognizer, TextStyle? style, String? text}) InlineSpan?
Builds TextSpan.
inherited
buildTooltip(BuildTree tree, Widget child, String message) Widget?
Builds Tooltip.
inherited
buildVideoPlayer(BuildTree tree, String url, {required bool autoplay, required bool controls, double? height, required bool loop, String? posterUrl, double? width}) Widget?
Builds VideoPlayer.
inherited
buildWebView(BuildMetadata meta, String url, {double? height, Iterable<String>? sandbox, double? width}) Widget?
Builds WebView.
inherited
buildWebViewLinkOnly(BuildMetadata meta, String url) Widget?
Builds fallback link when HtmlWidget.webView is disabled.
inherited
customStylesBuilder(Element element) StylesMap?
inherited
customWidgetBuilder(Element element) Widget?
inherited
dispose() → void
Called when the HtmlWidget's state is disposed.
inherited
getDependencies(BuildContext context) Iterable
Returns context-based dependencies.
inherited
getListMarkerText(String type, int i) String
Returns marker text for the specified list style type at index i.
inherited
imageProviderFromAsset(String url) ImageProvider<Object>?
Returns an AssetImage.
inherited
imageProviderFromDataUri(String dataUri) ImageProvider<Object>?
Returns a MemoryImage.
inherited
imageProviderFromFileUri(String url) ImageProvider<Object>?
Returns a FileImage.
inherited
imageProviderFromNetwork(String url) ImageProvider<Object>?
Returns a NetworkImage.
inherited
imageSvgFromAsset(String url) → BytesLoader?
Returns an SvgAssetLoader.
inherited
imageSvgFromDataUri(String dataUri) → BytesLoader?
Returns a SvgBytesLoader.
inherited
imageSvgFromFileUri(String url) → BytesLoader?
Returns a SvgFileLoader.
inherited
imageSvgFromNetwork(String url) → BytesLoader?
Returns a SvgNetworkLoader.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onErrorBuilder(BuildContext context, BuildTree tree, [dynamic error, dynamic data]) Widget?
Builder for error widget if a complicated element failed to render.
inherited
onLoadingBuilder(BuildContext context, BuildTree tree, [double? loadingProgress, dynamic data]) Widget?
Builder for loading widget while a complicated element is loading.
inherited
onTapAnchor(String id, EnsureVisible scrollTo) Future<bool>
inherited
onTapAnchorWrapper(String id) Future<bool>
inherited
onTapCallback(String url) Future<bool>
Calls HtmlWidget.onTapUrl with url.
inherited
onTapUrl(String url) Future<bool>
Handles user tapping a link.
inherited
parse(BuildMetadata meta) → void
Parses tree for build ops and text styles.
inherited
parseStyle(BuildTree tree, Declaration style) → void
Parses inline style css.Declaration one by one. This also handles styling from BuildOps and HtmlWidget.customStylesBuilder.
inherited
parseStyleDisplay(BuildTree tree, String? value) → void
Parses display inline style.
inherited
prepareAnchorIndexByAnchor(List<Widget> widgets) → void
inherited
reset(State<StatefulWidget> state) → void
Resets for a new build.
inherited
toString() String
A string representation of this object.
inherited
urlFull(String url) String?
Resolves full URL with HtmlWidget.baseUrl if available.
inherited

Operators

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