WebFLoadingMode enum
Values
- preloading → const WebFLoadingMode
-
This mode preloads remote resources into memory and begins execution when the WebF widget is mounted into the Flutter tree. If the entrypoint is an HTML file, the HTML will be parsed, and its elements will be organized into a DOM tree. CSS files loaded through
<style>and<link>elements will be parsed and the calculated styles applied to the corresponding DOM elements. However, JavaScript code will not be executed in this mode. If the entrypoint is a JavaScript file, WebF only do loading until the WebF widget is mounted into the Flutter tree. Using this mode can save up to 50% of loading time, while maintaining a high level of compatibility with the standard mode. It's safe and recommended to use this mode for all types of pages. - preRendering → const WebFLoadingMode
-
The
aggressivemode is a step further thanpreloading, cutting down up to 90% of loading time for optimal performance. This mode simulates the instantaneous response of native Flutter pages but may require modifications in the existing web codes for compatibility. In this mode, all remote resources are loaded and executed similarly to the standard mode, but with an offline-like behavior. Given that JavaScript is executed in this mode, properties likeclientWidthandclientHeightfrom the CSSOM-view spec always return 0. This is because no layout or paint processes occur during preRendering. If your application depends on CSSOM-view properties to work, ensure that the related code is placed within theloadandDOMContentLoadedevent callbacks of the window. These callbacks are triggered once the WebF widget is mounted into the Flutter tree. Apps optimized for this mode remain compatible with bothstandardandpreloadingmodes.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
WebFLoadingMode> - A constant List of the values in this enum, in order of their declaration.