UserScript class Null safety

Class that represents a script that the WebView injects into the web page.

Constructors

UserScript({String? groupName, required String source, required UserScriptInjectionTime injectionTime, bool iosForMainFrameOnly = true, ContentWorld? contentWorld})

Properties

contentWorld ContentWorld
A scope of execution in which to evaluate the script to prevent conflicts between different scripts. For more information about content worlds, see ContentWorld.
read / write
groupName String?
The script’s group name.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
injectionTime UserScriptInjectionTime
The time at which to inject the script into the WebView.
read / write
iosForMainFrameOnly bool
A Boolean value that indicates whether to inject the script into the main frame. Specify true to inject the script only into the main frame, or false to inject it into all frames. The default value is true. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
source String
The script’s source code.
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
toMap() Map<String, dynamic>
toString() String
A string representation of this object. [...]
override

Operators

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