PlatformHeadlessInAppWebView class abstract
Class that represents a WebView in headless mode.
It can be used to run a WebView in background without attaching an InAppWebView to the widget tree.
NOTE: Remember to dispose it when you don't need it anymore.
- Inheritance
-
- Object
- PlatformInterface
- PlatformHeadlessInAppWebView
- Implemented types
- Annotations
-
- @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WebPlatform(requiresSameOrigin: false), WindowsPlatform(), LinuxPlatform()])
Constructors
- PlatformHeadlessInAppWebView(PlatformHeadlessInAppWebViewCreationParams params)
-
Creates a new PlatformHeadlessInAppWebView
factory
- PlatformHeadlessInAppWebView.implementation(PlatformHeadlessInAppWebViewCreationParams params)
- Used by the platform implementation to create a new PlatformHeadlessInAppWebView.
- PlatformHeadlessInAppWebView.static()
-
Creates a new PlatformHeadlessInAppWebView to access static methods.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
View ID.
no setter
- params → PlatformHeadlessInAppWebViewCreationParams
-
The parameters used to initialize the PlatformHeadlessInAppWebView.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- webViewController → PlatformInAppWebViewController?
-
WebView Controller that can be used to access the InAppWebViewController API.
no setter
Methods
-
dispose(
) → Future< void> -
Disposes the headless WebView.
override
-
getSize(
) → Future< Size?> - Gets the current size in pixels of the WebView.
-
isClassSupported(
{TargetPlatform? platform}) → bool -
Check if the current class is supported by the defaultTargetPlatform or a specific
platform. -
isMethodSupported(
PlatformHeadlessInAppWebViewMethod method, {TargetPlatform? platform}) → bool -
Check if the given
methodis supported by the defaultTargetPlatform or a specificplatform. -
isPropertySupported(
dynamic property, {TargetPlatform? platform}) → bool -
Check if the given
propertyis supported by the defaultTargetPlatform or a specificplatform. The property should be one of the PlatformWebViewCreationParamsProperty or PlatformHeadlessInAppWebViewCreationParamsProperty values. -
isRunning(
) → bool - Indicates if the headless WebView is running or not.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
) → Future< void> - Runs the headless WebView.
-
setSize(
Size size) → Future< void> - Set the size of the WebView in pixels.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited