updated some code docs, fix #1405
This commit is contained in:
parent
6037b8964b
commit
fa49616c63
@ -1,3 +1,7 @@
|
||||
## 6.0.0-beta.11
|
||||
|
||||
- Fixed "[webRTC / macOS] onPermissionRequest not called on HeadlessInAppWebView" [#1405](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1405)
|
||||
|
||||
## 6.0.0-beta.10
|
||||
|
||||
- Created `WebUri` class to replace `Uri` dart core type. Related to:
|
||||
|
@ -132,7 +132,7 @@ void customTabs() {
|
||||
name: "button1",
|
||||
defPackage:
|
||||
"com.pichillilorenzo.flutter_inappwebviewexample"),
|
||||
onClick: (Uri? url) {
|
||||
onClick: (WebUri? url) {
|
||||
print("Button 1 with $url");
|
||||
}),
|
||||
ChromeSafariBrowserSecondaryToolbarClickableID(
|
||||
@ -140,7 +140,7 @@ void customTabs() {
|
||||
name: "button2",
|
||||
defPackage:
|
||||
"com.pichillilorenzo.flutter_inappwebviewexample"),
|
||||
onClick: (Uri? url) {
|
||||
onClick: (WebUri? url) {
|
||||
print("Button 2 with $url");
|
||||
}),
|
||||
]));
|
||||
@ -163,7 +163,7 @@ void customTabs() {
|
||||
name: "button3",
|
||||
defPackage:
|
||||
"com.pichillilorenzo.flutter_inappwebviewexample"),
|
||||
onClick: (Uri? url) {
|
||||
onClick: (WebUri? url) {
|
||||
print("Button 3 with $url");
|
||||
}),
|
||||
]));
|
||||
|
@ -6,7 +6,8 @@ import 'package:flutter/services.dart' show rootBundle;
|
||||
|
||||
import 'mime_type_resolver.dart';
|
||||
|
||||
///This class allows you to create a simple server on `http://localhost:[port]/` in order to be able to load your assets file on a server.
|
||||
///This class allows you to create a simple server on `http://localhost:[port]/`
|
||||
///in order to be able to load your assets file on a local server.
|
||||
///The default `port` value is `8080`.
|
||||
///
|
||||
///**Supported Platforms/Implementations**:
|
||||
|
@ -1592,7 +1592,7 @@ class InAppWebViewController {
|
||||
///This URL must be a file-based URL (using the `file://` scheme).
|
||||
///Specify the same value as the URL parameter to prevent WebView from reading any other content.
|
||||
///Specify a directory to give WebView permission to read additional files in the specified directory.
|
||||
///**NOTE**: available only on iOS.
|
||||
///**NOTE**: available only on iOS and MacOS.
|
||||
///
|
||||
///**NOTE for Android**: when loading an URL Request using "POST" method, headers are ignored.
|
||||
///
|
||||
@ -1661,7 +1661,7 @@ class InAppWebViewController {
|
||||
///This [baseUrl] must be a file-based URL (using the `file://` scheme).
|
||||
///Specify the same value as the [baseUrl] parameter to prevent WebView from reading any other content.
|
||||
///Specify a directory to give WebView permission to read additional files in the specified directory.
|
||||
///**NOTE**: available only on iOS.
|
||||
///**NOTE**: available only on iOS and MacOS.
|
||||
///
|
||||
///**Supported Platforms/Implementations**:
|
||||
///- Android native WebView ([Official API - WebView.loadDataWithBaseURL](https://developer.android.com/reference/android/webkit/WebView#loadDataWithBaseURL(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)))
|
||||
|
@ -127,13 +127,13 @@ abstract class WebView {
|
||||
InAppWebViewController controller, ConsoleMessage consoleMessage)?
|
||||
onConsoleMessage;
|
||||
|
||||
///Give the host application a chance to take control when a URL is about to be loaded in the current WebView. This event is not called on the initial load of the WebView.
|
||||
///Give the host application a chance to take control when a URL is about to be loaded in the current WebView.
|
||||
///
|
||||
///Note that on Android there isn't any way to load an URL for a frame that is not the main frame, so if the request is not for the main frame, the navigation is allowed by default.
|
||||
///However, if you want to cancel requests for subframes, you can use the [InAppWebViewSettings.regexToCancelSubFramesLoading] setting
|
||||
///to write a Regular Expression that, if the url request of a subframe matches, then the request of that subframe is canceled.
|
||||
///
|
||||
///Also, on Android, this method is not called for POST requests.
|
||||
///Also, on Android, this event is not called for POST requests.
|
||||
///
|
||||
///[navigationAction] represents an object that contains information about an action that causes navigation to occur.
|
||||
///
|
||||
@ -448,7 +448,7 @@ abstract class WebView {
|
||||
///Event fired when the host application updates its visited links database.
|
||||
///This event is also fired when the navigation state of the [WebView] changes through the usage of
|
||||
///javascript **[History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API)** functions (`pushState()`, `replaceState()`) and `onpopstate` event
|
||||
///or, also, when the javascript `window.location` changes without reloading the webview (for example appending or modifying an hash to the url).
|
||||
///or, also, when the javascript `window.location` changes without reloading the webview (for example appending or modifying a hash to the url).
|
||||
///
|
||||
///[url] represents the url being visited.
|
||||
///
|
||||
@ -670,7 +670,7 @@ abstract class WebView {
|
||||
///If the return value is `null`, the WebView will continue to load the resource as usual.
|
||||
///Otherwise, the return response and data will be used.
|
||||
///
|
||||
///This callback is invoked for a variety of URL schemes (e.g., `http(s):`, `data:`, `file:`, etc.),
|
||||
///This event is invoked for a variety of URL schemes (e.g., `http(s):`, `data:`, `file:`, etc.),
|
||||
///not only those schemes which send requests over the network.
|
||||
///This is not called for `javascript:` URLs, `blob:` URLs, or for assets accessed via `file:///android_asset/` or `file:///android_res/` URLs.
|
||||
///
|
||||
|
@ -8,6 +8,8 @@ part 'activity_button.g.dart';
|
||||
///When tapped, it will invoke a Share or Action Extension bundled with your app.
|
||||
///The default VoiceOver description of this button is the `CFBundleDisplayName` set in the extension's `Info.plist`.
|
||||
///
|
||||
///Check [Official Apple App Extensions](https://developer.apple.com/app-extensions/) for more details.
|
||||
///
|
||||
///**Supported Platforms/Implementations**:
|
||||
///- iOS
|
||||
@ExchangeableObject()
|
||||
@ -15,7 +17,7 @@ class ActivityButton_ {
|
||||
///The name of the image asset or file.
|
||||
UIImage_ templateImage;
|
||||
|
||||
///The name of the system symbol image.
|
||||
///The name of the App or Share Extension to be called.
|
||||
String extensionIdentifier;
|
||||
|
||||
@ExchangeableObjectConstructor()
|
||||
|
@ -10,13 +10,15 @@ part of 'activity_button.dart';
|
||||
///When tapped, it will invoke a Share or Action Extension bundled with your app.
|
||||
///The default VoiceOver description of this button is the `CFBundleDisplayName` set in the extension's `Info.plist`.
|
||||
///
|
||||
///Check [Official Apple App Extensions](https://developer.apple.com/app-extensions/) for more details.
|
||||
///
|
||||
///**Supported Platforms/Implementations**:
|
||||
///- iOS
|
||||
class ActivityButton {
|
||||
///The name of the image asset or file.
|
||||
UIImage templateImage;
|
||||
|
||||
///The name of the system symbol image.
|
||||
///The name of the App or Share Extension to be called.
|
||||
String extensionIdentifier;
|
||||
ActivityButton(
|
||||
{required this.templateImage, required this.extensionIdentifier});
|
||||
|
@ -2,7 +2,7 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_i
|
||||
|
||||
part 'android_resource.g.dart';
|
||||
|
||||
///Class that represents an android resource.
|
||||
///Class that represents an Android resource file.
|
||||
@ExchangeableObject()
|
||||
class AndroidResource_ {
|
||||
///Android resource name.
|
||||
|
@ -6,7 +6,7 @@ part of 'android_resource.dart';
|
||||
// ExchangeableObjectGenerator
|
||||
// **************************************************************************
|
||||
|
||||
///Class that represents an android resource.
|
||||
///Class that represents an Android resource file.
|
||||
class AndroidResource {
|
||||
///Android resource name.
|
||||
///
|
||||
|
@ -6,6 +6,8 @@ part 'ui_image.g.dart';
|
||||
|
||||
///Class that represents an object that manages iOS image data in your app.
|
||||
///
|
||||
///Check [UIKit.UIImage](https://developer.apple.com/documentation/uikit/uiimage) for more details.
|
||||
///
|
||||
///**Supported Platforms/Implementations**:
|
||||
///- iOS
|
||||
@ExchangeableObject()
|
||||
|
@ -8,6 +8,8 @@ part of 'ui_image.dart';
|
||||
|
||||
///Class that represents an object that manages iOS image data in your app.
|
||||
///
|
||||
///Check [UIKit.UIImage](https://developer.apple.com/documentation/uikit/uiimage) for more details.
|
||||
///
|
||||
///**Supported Platforms/Implementations**:
|
||||
///- iOS
|
||||
class UIImage {
|
||||
|
@ -36,6 +36,14 @@ public class HeadlessInAppWebView : Disposable {
|
||||
view.frame = CGRect(x: 0.0, y: 0.0, width: NSApplication.shared.mainWindow?.contentView?.bounds.width ?? 0.0,
|
||||
height: NSApplication.shared.mainWindow?.contentView?.bounds.height ?? 0.0)
|
||||
}
|
||||
/// Note: The WKWebView behaves very unreliable when rendering offscreen
|
||||
/// on a device. This is especially true with JavaScript, which simply
|
||||
/// won't be executed sometimes.
|
||||
/// So, add the headless WKWebView to the view hierarchy.
|
||||
/// This way is also possible to take screenshots.
|
||||
let wrapperView = NSView() // wrapper view with frame zero
|
||||
wrapperView.addSubview(view, positioned: .below, relativeTo: nil)
|
||||
NSApplication.shared.mainWindow?.contentView?.addSubview(wrapperView, positioned: .below, relativeTo: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,6 +80,9 @@ public class HeadlessInAppWebView : Disposable {
|
||||
channelDelegate?.dispose()
|
||||
channelDelegate = nil
|
||||
HeadlessInAppWebViewManager.webViews[id] = nil
|
||||
if let view = flutterWebView?.view() {
|
||||
view.superview?.removeFromSuperview()
|
||||
}
|
||||
flutterWebView = nil
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: flutter_inappwebview
|
||||
description: A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
|
||||
version: 6.0.0-beta.10
|
||||
version: 6.0.0-beta.11
|
||||
homepage: https://inappwebview.dev/
|
||||
repository: https://github.com/pichillilorenzo/flutter_inappwebview
|
||||
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues
|
||||
|
Loading…
x
Reference in New Issue
Block a user