WebF class
- Inheritance
Constructors
-
WebF.new({Key? key, double? viewportWidth, double? viewportHeight, @Deprecated('Initialize WebFController instance before using WebF() widget.' 'To help you get remote resource preloaded before rendering WebF pages.' 'Setting this param to WebFController instead.' 'This feature was deprecated after v0.16.0-beta.1.') WebFBundle? bundle, OnControllerCreated? onControllerCreated, LoadHandler? onLoad, LoadHandler? onDOMContentLoaded, WebFMethodChannel? javaScriptChannel, Color? background, GestureListener? gestureListener, DevToolsService? devToolsService, HttpClientInterceptor? httpClientInterceptor, UriParser? uriParser, WebFThread? runningThread, RouteObserver<
ModalRoute< ? routeObserver, List<void> >Cookie> ? initialCookies, List<WebFBundle> ? preloadedBundles, WebFController? controller, bool disableViewportWidthAssertion = false, bool disableViewportHeightAssertion = false, LoadErrorHandler? onLoadError, AnimationController? animationController, JSErrorHandler? onJSError, bool resizeToAvoidBottomInsets = true})
Properties
- animationController → AnimationController?
-
The animationController of Flutter Route object.
Pass this object to webFWidget to make sure webF execute JavaScripts scripts after route transition animation completed.
final
- background → Color?
-
The background color for viewport, default to transparent.
final
- bundle → WebFBundle?
-
The initial bundle to load.
final
- controller → WebFController?
-
no setter
- devToolsService → DevToolsService?
-
final
- gestureListener → GestureListener?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClientInterceptor → HttpClientInterceptor?
-
final
-
initialCookies
→ List<
Cookie> ? -
The initial cookies to set.
final
- javaScriptChannel → WebFMethodChannel?
-
A method channel for receiving messaged from JavaScript code and sending message to JavaScript.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
The methods of the webFNavigateDelegation help you implement custom behaviors that are triggered
during a webf view's process of loading, and completing a navigation request.
final
- onControllerCreated → OnControllerCreated?
-
Trigger when webf controller once created.
final
- onDOMContentLoaded → LoadHandler?
-
https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event
final
- onJSError → JSErrorHandler?
-
final
- onLoad → LoadHandler?
-
final
- onLoadError → LoadErrorHandler?
-
final
-
preloadedBundles
→ List<
WebFBundle> ? -
Remote resources (HTML, CSS, JavaScript, Images, and other content loadable via WebFBundle) can be pre-loaded before WebF is mounted in Flutter.
Use this property to reduce loading times when a WebF application attempts to load external resources on pages.
final
- resizeToAvoidBottomInsets → bool
-
If true the content should size itself to avoid the onscreen keyboard
whose height is defined by the ambient FlutterView's
FlutterView.viewInsets
bottom
property.final -
routeObserver
→ RouteObserver<
ModalRoute< ?void> > -
Register the RouteObserver to observer page navigation.
This is useful if you wants to pause webf timers and callbacks when webf widget are hidden by page route.
https://api.flutter.dev/flutter/widgets/RouteObserver-class.html
final
- runningThread → WebFThread?
-
Specify the running thread for your JavaScript codes.
Default value: DedicatedThread();
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uriParser → UriParser?
-
final
- viewportHeight → double?
-
the height of webFWidget
final
- viewportWidth → double?
-
the width of webFWidget
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → WebFState -
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
-
load(
WebFBundle bundle) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
) → Future< void> -
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
-
defineCustomElement(
String tagName, ElementCreator creator) → void -
setHttpCacheMode(
HttpCacheMode mode) → void