PlatformInAppBrowser class abstract
This class represents a native WebView displayed on top of the Flutter App, so it's not integrated into the Flutter widget tree. It uses the native WebView of the platform. The webViewController field can be used to access the PlatformInAppWebViewController API.
- Inheritance
-
- Object
- PlatformInterface
- PlatformInAppBrowser
- Implemented types
- Annotations
-
- @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WindowsPlatform(), LinuxPlatform(apiName: 'GtkWindow + WPE WebKit', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/class.WebView.html')])
Constructors
- PlatformInAppBrowser(PlatformInAppBrowserCreationParams params)
-
Creates a new PlatformInAppBrowser
factory
- PlatformInAppBrowser.implementation(PlatformInAppBrowserCreationParams params)
- Used by the platform implementation to create a new PlatformInAppBrowser.
- PlatformInAppBrowser.static()
-
Creates a new PlatformInAppBrowser to access static methods.
factory
Properties
- contextMenu → ContextMenu?
-
Context menu which contains custom menu items to be shown when ContextMenu is presented.
no setter
- eventHandler ↔ PlatformInAppBrowserEvents?
-
Event handler object that handles the PlatformInAppBrowser events.
getter/setter pair
- findInteractionController → PlatformFindInteractionController?
-
Represents the find interaction feature controller.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
View ID used internally.
no setter
-
initialUserScripts
→ UnmodifiableListView<
UserScript> ? -
Initial list of user scripts to be loaded at start or end of a page loading.
To add or remove user scripts, you have to use the InAppWebViewController's methods such as InAppWebViewController.addUserScript,
InAppWebViewController.removeUserScript, InAppWebViewController.removeAllUserScripts, etc.
no setter
- params → PlatformInAppBrowserCreationParams
-
The parameters used to initialize the PlatformInAppBrowser.
final
- pullToRefreshController → PlatformPullToRefreshController?
-
Represents the pull-to-refresh feature controller.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- webViewController → PlatformInAppWebViewController?
-
WebView Controller that can be used to access the PlatformInAppWebViewController API.
When
onExitis fired, this will benulland cannot be used anymore.no setter - webViewEnvironment → PlatformWebViewEnvironment?
-
Used to create the PlatformInAppBrowser using the specified environment.
no setter
- windowId → int?
-
The window id of a CreateWindowAction.windowId.
no setter
Methods
-
addMenuItem(
) → void - Adds a InAppBrowserMenuItem to the menu. If the browser is already open, it will take effect the next time it is opened.
-
addMenuItems(
) → void - Adds a list of InAppBrowserMenuItem to the menu. If the browser is already open, it will take effect the next time it is opened.
-
close(
) → Future< void> - Closes the PlatformInAppBrowser window.
-
dispose(
) → void -
Disposes the channel and controllers.
override
-
getOptions(
) → Future< InAppBrowserClassOptions?> - Use getSettings instead.
-
getSettings(
) → Future< InAppBrowserClassSettings?> -
Gets the current PlatformInAppBrowser settings. Returns
nullif it wasn't able to get them. -
hasMenuItem(
) → bool -
Returns
trueif themenuItemhas been already added, otherwisefalse. -
hide(
) → Future< void> - Hides the PlatformInAppBrowser window. Calling this has no effect if the PlatformInAppBrowser was already hidden.
-
isClassSupported(
{TargetPlatform? platform}) → bool -
Check if the current class is supported by the defaultTargetPlatform or a specific
platform. -
isEventMethodSupported(
PlatformInAppBrowserEventsMethod method, {TargetPlatform? platform}) → bool -
Check if the given
methodis supported by the defaultTargetPlatform or a specificplatform. -
isHidden(
) → Future< bool> - Check if the Web View of the PlatformInAppBrowser instance is hidden.
-
isMethodSupported(
PlatformInAppBrowserMethod method, {TargetPlatform? platform}) → bool -
Check if the given
methodis supported by the defaultTargetPlatform or a specificplatform. -
isOpened(
) → bool -
Returns
trueif the PlatformInAppBrowser instance is opened, otherwisefalse. -
isPropertySupported(
PlatformInAppBrowserProperty property, {TargetPlatform? platform}) → bool -
Check if the given
propertyis supported by the defaultTargetPlatform or a specificplatform. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openData(
{required String data, String mimeType = "text/html", String encoding = "utf8", WebUri? baseUrl, Uri? androidHistoryUrl, WebUri? historyUrl, InAppBrowserClassOptions? options, InAppBrowserClassSettings? settings}) → Future< void> -
Opens the PlatformInAppBrowser instance with
dataas a content, usingbaseUrlas the base URL for it. -
openFile(
{required String assetFilePath, InAppBrowserClassOptions? options, InAppBrowserClassSettings? settings}) → Future< void> -
Opens the PlatformInAppBrowser instance with the given
assetFilePathfile. -
openUrlRequest(
{required URLRequest urlRequest, InAppBrowserClassOptions? options, InAppBrowserClassSettings? settings}) → Future< void> -
Opens the PlatformInAppBrowser instance with an
urlRequest. -
openWithSystemBrowser(
{required WebUri url}) → Future< void> -
This is a static method that opens an
urlin the system browser. You wont be able to use the PlatformInAppBrowser events and methods here. -
removeAllMenuItem(
) → void - Removes all the menu items from the list. If the browser is already open, it will take effect the next time it is opened.
-
removeMenuItem(
) → bool -
Removes the
menuItemfrom the list. Returnstrueif it was in the list,falseotherwise. If the browser is already open, it will take effect the next time it is opened. -
removeMenuItems(
) → void -
Removes a list of
menuItemsfrom the list. If the browser is already open, it will take effect the next time it is opened. -
setOptions(
{required InAppBrowserClassOptions options}) → Future< void> - Use setSettings instead.
-
setSettings(
{required InAppBrowserClassSettings settings}) → Future< void> -
Sets the PlatformInAppBrowser settings with the new
settingsand evaluates them. -
show(
) → Future< void> - Displays a PlatformInAppBrowser window that was opened hidden. Calling this has no effect if the PlatformInAppBrowser was already visible.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- debugLoggingSettings ↔ DebugLoggingSettings
-
Debug settings.
getter/setter pair