Updated minimum platform interface and implementation versions, Fixed events not called on InAppBrowser and ChromeSafariBrowser opening same instance multiple times

This commit is contained in:
Lorenzo Pichilli 2023-12-04 04:32:01 +01:00
parent 290cfd6efa
commit df678091e9
22 changed files with 85 additions and 53 deletions

View File

@ -1,3 +1,8 @@
## 6.0.0-beta.31
- Updated minimum platform interface and implementation versions
- Fixed events not called on `InAppBrowser` and `ChromeSafariBrowser` opening same instance multiple times
## 6.0.0-beta.30
- Updated minimum platform interface and implementation versions

View File

@ -42,13 +42,15 @@ class ChromeSafariBrowser implements PlatformChromeSafariBrowserEvents {
@Deprecated('Use settings instead')
// ignore: deprecated_member_use_from_same_package
ChromeSafariBrowserClassOptions? options,
ChromeSafariBrowserSettings? settings}) =>
platform.open(
url: url,
headers: headers,
otherLikelyURLs: otherLikelyURLs,
options: options,
settings: settings);
ChromeSafariBrowserSettings? settings}) {
this.platform.eventHandler = this;
return platform.open(
url: url,
headers: headers,
otherLikelyURLs: otherLikelyURLs,
options: options,
settings: settings);
}
///{@macro flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.launchUrl}
Future<void> launchUrl({

View File

@ -95,17 +95,21 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
Future<void> openUrlRequest(
{required URLRequest urlRequest,
@Deprecated('Use settings instead') InAppBrowserClassOptions? options,
InAppBrowserClassSettings? settings}) =>
platform.openUrlRequest(
urlRequest: urlRequest, options: options, settings: settings);
InAppBrowserClassSettings? settings}) {
this.platform.eventHandler = this;
return platform.openUrlRequest(
urlRequest: urlRequest, options: options, settings: settings);
}
///{@macro flutter_inappwebview_platform_interface.PlatformInAppBrowser.openFile}
Future<void> openFile(
{required String assetFilePath,
@Deprecated('Use settings instead') InAppBrowserClassOptions? options,
InAppBrowserClassSettings? settings}) =>
platform.openFile(
assetFilePath: assetFilePath, options: options, settings: settings);
InAppBrowserClassSettings? settings}) {
this.platform.eventHandler = this;
return platform.openFile(
assetFilePath: assetFilePath, options: options, settings: settings);
}
///{@macro flutter_inappwebview_platform_interface.PlatformInAppBrowser.openData}
Future<void> openData(
@ -116,16 +120,18 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
@Deprecated("Use historyUrl instead") Uri? androidHistoryUrl,
WebUri? historyUrl,
@Deprecated('Use settings instead') InAppBrowserClassOptions? options,
InAppBrowserClassSettings? settings}) =>
platform.openData(
data: data,
mimeType: mimeType,
encoding: encoding,
baseUrl: baseUrl,
androidHistoryUrl: androidHistoryUrl,
historyUrl: historyUrl,
options: options,
settings: settings);
InAppBrowserClassSettings? settings}) {
this.platform.eventHandler = this;
return platform.openData(
data: data,
mimeType: mimeType,
encoding: encoding,
baseUrl: baseUrl,
androidHistoryUrl: androidHistoryUrl,
historyUrl: historyUrl,
options: options,
settings: settings);
}
///{@macro flutter_inappwebview_platform_interface.PlatformInAppBrowser.openWithSystemBrowser}
static Future<void> openWithSystemBrowser({required WebUri url}) =>

View File

@ -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.30
version: 6.0.0-beta.31
homepage: https://inappwebview.dev/
repository: https://github.com/pichillilorenzo/flutter_inappwebview
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues
@ -18,11 +18,11 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_inappwebview_platform_interface: ^1.0.2
flutter_inappwebview_android: ^1.0.2
flutter_inappwebview_ios: ^1.0.2
flutter_inappwebview_macos: ^1.0.1
flutter_inappwebview_web: ^1.0.1
flutter_inappwebview_platform_interface: ^1.0.5
flutter_inappwebview_android: ^1.0.5
flutter_inappwebview_ios: ^1.0.5
flutter_inappwebview_macos: ^1.0.2
flutter_inappwebview_web: ^1.0.2
dev_dependencies:
flutter_test:

View File

@ -1,3 +1,7 @@
## 1.0.5
- Call `super.dispose();` on `InAppBrowser` and `ChromeSafari` implementations
## 1.0.4
- Throw platform exception when ProcessGlobalConfig.apply throws an error on the native side to be able to catch it on Flutter side

View File

@ -81,7 +81,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.2"
version: "1.0.4"
flutter_inappwebview_internal_annotations:
dependency: transitive
description:
@ -93,11 +93,10 @@ packages:
flutter_inappwebview_platform_interface:
dependency: transitive
description:
name: flutter_inappwebview_platform_interface
sha256: "14e7a7fb25fde02e753ed8fd5276f3b8a49f6e7ee2867c20d02ceef9e3091542"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
path: "../../flutter_inappwebview_platform_interface"
relative: true
source: path
version: "1.0.4"
flutter_lints:
dependency: "direct dev"
description:

View File

@ -370,7 +370,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
@override
@mustCallSuper
void dispose() {
super.dispose();
disposeChannel();
eventHandler = null;
}
}

View File

@ -359,12 +359,12 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
@override
@mustCallSuper
void dispose() {
super.dispose();
disposeChannel();
_webViewController?.dispose();
_webViewController = null;
pullToRefreshController?.dispose();
findInteractionController?.dispose();
eventHandler = null;
}
}

View File

@ -1,6 +1,6 @@
name: flutter_inappwebview_android
description: Android implementation of the flutter_inappwebview plugin.
version: 1.0.4
version: 1.0.5
homepage: https://inappwebview.dev/
repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_android
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues
@ -18,7 +18,7 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_inappwebview_platform_interface: ^1.0.2
flutter_inappwebview_platform_interface: ^1.0.5
dev_dependencies:
flutter_test:

View File

@ -1,3 +1,7 @@
## 1.0.5
- Call `super.dispose();` on `InAppBrowser` and `ChromeSafari` implementations
## 1.0.4
- Fixed "Cloudflare Turnstile failure" [#1738](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1738)

View File

@ -212,7 +212,7 @@ class IOSChromeSafariBrowser extends PlatformChromeSafariBrowser
@override
@mustCallSuper
void dispose() {
super.dispose();
disposeChannel();
eventHandler = null;
}
}

View File

@ -358,12 +358,12 @@ class IOSInAppBrowser extends PlatformInAppBrowser with ChannelController {
@override
@mustCallSuper
void dispose() {
super.dispose();
disposeChannel();
_webViewController?.dispose();
_webViewController = null;
pullToRefreshController?.dispose();
findInteractionController?.dispose();
eventHandler = null;
}
}

View File

@ -1,6 +1,6 @@
name: flutter_inappwebview_ios
description: iOS implementation of the flutter_inappwebview plugin.
version: 1.0.4
version: 1.0.5
homepage: https://inappwebview.dev/
repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_ios
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues
@ -18,7 +18,7 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_inappwebview_platform_interface: ^1.0.2
flutter_inappwebview_platform_interface: ^1.0.5
dev_dependencies:
flutter_test:

View File

@ -1,3 +1,7 @@
## 1.0.3
- Call `super.dispose();` on `InAppBrowser` implementation
## 1.0.2
- Fixed "Cloudflare Turnstile failure" [#1738](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1738)

View File

@ -353,12 +353,12 @@ class MacOSInAppBrowser extends PlatformInAppBrowser with ChannelController {
@override
@mustCallSuper
void dispose() {
super.dispose();
disposeChannel();
_webViewController?.dispose();
_webViewController = null;
pullToRefreshController?.dispose();
findInteractionController?.dispose();
eventHandler = null;
}
}

View File

@ -1,6 +1,6 @@
name: flutter_inappwebview_macos
description: macOS implementation of the flutter_inappwebview plugin.
version: 1.0.2
version: 1.0.3
homepage: https://inappwebview.dev/
repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_macos
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues
@ -18,7 +18,7 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_inappwebview_platform_interface: ^1.0.2
flutter_inappwebview_platform_interface: ^1.0.5
dev_dependencies:
flutter_test:

View File

@ -1,3 +1,7 @@
## 1.0.5
- Must call super `dispose` method for `PlatformInAppBrowser` and `PlatformChromeSafariBrowser`
## 1.0.4
- Expose missing `InAppBrowserSettings.menuButtonColor` option

View File

@ -466,9 +466,9 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
///Disposes the channel and event handler.
///{@endtemplate}
@override
@mustCallSuper
void dispose() {
throw UnimplementedError(
'dispose is not implemented on the current platform');
eventHandler = null;
}
}

View File

@ -474,9 +474,9 @@ abstract class PlatformInAppBrowser extends PlatformInterface
///Disposes the channel and controllers.
///{@endtemplate}
@override
@mustCallSuper
void dispose() {
throw UnimplementedError(
'dispose is not implemented on the current platform');
eventHandler = null;
}
}

View File

@ -1,6 +1,6 @@
name: flutter_inappwebview_platform_interface
description: A common platform interface for the flutter_inappwebview plugin.
version: 1.0.4
version: 1.0.5
homepage: https://inappwebview.dev/
repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_platform_interface
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues

View File

@ -1,3 +1,7 @@
## 1.0.2
- Updated `flutter_inappwebview_platform_interface` version dependency to `1.0.5`
## 1.0.1
- Updated `flutter_inappwebview_platform_interface` version dependency to `1.0.2`

View File

@ -1,6 +1,6 @@
name: flutter_inappwebview_web
description: Web implementation of the flutter_inappwebview plugin.
version: 1.0.1
version: 1.0.2
homepage: https://inappwebview.dev/
repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_web
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues
@ -21,7 +21,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
js: ^0.6.4
flutter_inappwebview_platform_interface: ^1.0.2
flutter_inappwebview_platform_interface: ^1.0.5
dev_dependencies:
flutter_test: