Skip to content

Commit

Permalink
Merge branch 'v6.2.0-beta.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
pichillilorenzo committed Nov 26, 2024
2 parents 1d09dd6 + 6143eb3 commit b39c1e7
Show file tree
Hide file tree
Showing 69 changed files with 754 additions and 937 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.0

- Updated `ExchangeableEnum` and `ExchangeableObjectProperty`.

## 1.1.1

- Added `ExchangeableObject.fromMapForceAllInline`.
Expand Down
4 changes: 2 additions & 2 deletions dev_packages/generators/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ dependencies:
build: ^2.4.1
source_gen: ^1.5.0
collection: any
flutter_inappwebview_internal_annotations: #^1.2.0
path: ../flutter_inappwebview_internal_annotations
flutter_inappwebview_internal_annotations: ^1.2.0
# path: ../flutter_inappwebview_internal_annotations

dev_dependencies:
build_runner: ^2.4.12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
}

@override
FutureOr<AjaxRequestAction?>? onAjaxReadyStateChange(AjaxRequest ajaxRequest) {
FutureOr<AjaxRequestAction?>? onAjaxReadyStateChange(
AjaxRequest ajaxRequest) {
return null;
}

Expand Down Expand Up @@ -363,7 +364,8 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
void onDownloadStartRequest(DownloadStartRequest downloadStartRequest) {}

@override
FutureOr<DownloadStartResponse?>? onDownloadStarting(DownloadStartRequest downloadStartRequest) {
FutureOr<DownloadStartResponse?>? onDownloadStarting(
DownloadStartRequest downloadStartRequest) {
return null;
}

Expand Down Expand Up @@ -529,7 +531,8 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
void onRenderProcessGone(RenderProcessGoneDetail detail) {}

@override
FutureOr<WebViewRenderProcessAction?>? onRenderProcessResponsive(WebUri? url) {
FutureOr<WebViewRenderProcessAction?>? onRenderProcessResponsive(
WebUri? url) {
return null;
}

Expand Down
408 changes: 136 additions & 272 deletions flutter_inappwebview/lib/src/in_app_webview/headless_in_app_webview.dart

Large diffs are not rendered by default.

409 changes: 137 additions & 272 deletions flutter_inappwebview/lib/src/in_app_webview/in_app_webview.dart

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ class InAppWebViewController {
Future<void> clearFocus() => platform.clearFocus();

///{@macro flutter_inappwebview_platform_interface.PlatformInAppWebViewController.setInputMethodEnabled}
Future<void> setInputMethodEnabled(bool enabled) => platform.setInputMethodEnabled(enabled);
Future<void> setInputMethodEnabled(bool enabled) =>
platform.setInputMethodEnabled(enabled);

///{@macro flutter_inappwebview_platform_interface.PlatformInAppWebViewController.showInputMethod}
Future<void> showInputMethod() => platform.showInputMethod();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class WebMessagePort implements IWebMessagePort {
///{@macro flutter_inappwebview_platform_interface.PlatformWebMessagePort.close}
Future<void> close() => platform.close();

Map<String, dynamic> toMap({EnumMethod? enumMethod}) => platform.toMap(enumMethod: enumMethod);
Map<String, dynamic> toMap({EnumMethod? enumMethod}) =>
platform.toMap(enumMethod: enumMethod);

Map<String, dynamic> toJson() => platform.toJson();

Expand Down
3 changes: 2 additions & 1 deletion flutter_inappwebview/lib/src/webview_asset_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ abstract class PathHandler
}

@override
Map<String, dynamic> toMap({EnumMethod? enumMethod}) => platform.toMap(enumMethod: enumMethod);
Map<String, dynamic> toMap({EnumMethod? enumMethod}) =>
platform.toMap(enumMethod: enumMethod);

@override
Map<String, dynamic> toJson() => platform.toJson();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,24 @@ class WebViewEnvironment {
.compareBrowserVersions(version1: version1, version2: version2);

///{@macro flutter_inappwebview_platform_interface.PlatformWebViewEnvironment.onNewBrowserVersionAvailable}
void Function()? get onNewBrowserVersionAvailable => platform.onNewBrowserVersionAvailable;
set onNewBrowserVersionAvailable(void Function()? value) => platform.onNewBrowserVersionAvailable = value;
void Function()? get onNewBrowserVersionAvailable =>
platform.onNewBrowserVersionAvailable;
set onNewBrowserVersionAvailable(void Function()? value) =>
platform.onNewBrowserVersionAvailable = value;

///{@macro flutter_inappwebview_platform_interface.PlatformWebViewEnvironment.onBrowserProcessExited}
void Function(BrowserProcessExitedDetail detail)? get onBrowserProcessExited => platform.onBrowserProcessExited;
set onBrowserProcessExited(void Function(BrowserProcessExitedDetail detail)? value) => platform.onBrowserProcessExited = value;
void Function(BrowserProcessExitedDetail detail)?
get onBrowserProcessExited => platform.onBrowserProcessExited;
set onBrowserProcessExited(
void Function(BrowserProcessExitedDetail detail)? value) =>
platform.onBrowserProcessExited = value;

///{@macro flutter_inappwebview_platform_interface.PlatformWebViewEnvironment.onProcessInfosChanged}
void Function(BrowserProcessInfosChangedDetail detail)? get onProcessInfosChanged => platform.onProcessInfosChanged;
set onProcessInfosChanged(void Function(BrowserProcessInfosChangedDetail detail)? value) => platform.onProcessInfosChanged = value;
void Function(BrowserProcessInfosChangedDetail detail)?
get onProcessInfosChanged => platform.onProcessInfosChanged;
set onProcessInfosChanged(
void Function(BrowserProcessInfosChangedDetail detail)? value) =>
platform.onProcessInfosChanged = value;

///{@macro flutter_inappwebview_platform_interface.PlatformWebViewEnvironment.dispose}
Future<void> dispose() => platform.dispose();
Expand Down
24 changes: 12 additions & 12 deletions flutter_inappwebview/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_inappwebview_platform_interface: #^1.4.0-beta.2
path: ../flutter_inappwebview_platform_interface
flutter_inappwebview_android: #^1.2.0-beta.2
path: ../flutter_inappwebview_android
flutter_inappwebview_ios: #^1.2.0-beta.2
path: ../flutter_inappwebview_ios
flutter_inappwebview_macos: #^1.2.0-beta.2
path: ../flutter_inappwebview_macos
flutter_inappwebview_web: #^1.2.0-beta.2
path: ../flutter_inappwebview_web
flutter_inappwebview_windows: #^0.7.0-beta.2
path: ../flutter_inappwebview_windows
flutter_inappwebview_platform_interface: ^1.4.0-beta.2
# path: ../flutter_inappwebview_platform_interface
flutter_inappwebview_android: ^1.2.0-beta.2
# path: ../flutter_inappwebview_android
flutter_inappwebview_ios: ^1.2.0-beta.2
# path: ../flutter_inappwebview_ios
flutter_inappwebview_macos: ^1.2.0-beta.2
# path: ../flutter_inappwebview_macos
flutter_inappwebview_web: ^1.2.0-beta.2
# path: ../flutter_inappwebview_web
flutter_inappwebview_windows: ^0.7.0-beta.2
# path: ../flutter_inappwebview_windows

dev_dependencies:
flutter_test:
Expand Down
14 changes: 8 additions & 6 deletions flutter_inappwebview_android/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,18 @@ packages:
flutter_inappwebview_internal_annotations:
dependency: transitive
description:
path: "../../dev_packages/flutter_inappwebview_internal_annotations"
relative: true
source: path
name: flutter_inappwebview_internal_annotations
sha256: "787171d43f8af67864740b6f04166c13190aa74a1468a1f1f1e9ee5b90c359cd"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
flutter_inappwebview_platform_interface:
dependency: transitive
description:
path: "../../flutter_inappwebview_platform_interface"
relative: true
source: path
name: flutter_inappwebview_platform_interface
sha256: "2c99bf767900ba029d825bc6f494d30169ee83cdaa038d86e85fe70571d0a655"
url: "https://pub.dev"
source: hosted
version: "1.4.0-beta.2"
flutter_lints:
dependency: "direct dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class AndroidHeadlessInAppWebViewCreationParams
super.onLoadResource,
super.onScrollChanged,
@Deprecated('Use onDownloadStarting instead') super.onDownloadStart,
@Deprecated('Use onDownloadStarting instead') super.onDownloadStartRequest,
@Deprecated('Use onDownloadStarting instead')
super.onDownloadStartRequest,
super.onDownloadStarting,
@Deprecated('Use onLoadResourceWithCustomScheme instead')
super.onLoadResourceCustomScheme,
Expand Down Expand Up @@ -362,7 +363,8 @@ class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
if (params.onLoadResource != null && settings.useOnLoadResource == null) {
settings.useOnLoadResource = true;
}
if ((params.onDownloadStartRequest != null || params.onDownloadStarting != null) &&
if ((params.onDownloadStartRequest != null ||
params.onDownloadStarting != null) &&
settings.useOnDownloadStart == null) {
settings.useOnDownloadStart = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class AndroidInAppWebViewWidgetCreationParams
super.onLoadResource,
super.onScrollChanged,
@Deprecated('Use onDownloadStarting instead') super.onDownloadStart,
@Deprecated('Use onDownloadStarting instead') super.onDownloadStartRequest,
@Deprecated('Use onDownloadStarting instead')
super.onDownloadStartRequest,
super.onDownloadStarting,
@Deprecated('Use onLoadResourceWithCustomScheme instead')
super.onLoadResourceCustomScheme,
Expand Down Expand Up @@ -424,7 +425,8 @@ class AndroidInAppWebViewWidget extends PlatformInAppWebViewWidget {
if (params.onLoadResource != null && settings.useOnLoadResource == null) {
settings.useOnLoadResource = true;
}
if ((params.onDownloadStartRequest != null || params.onDownloadStarting != null) &&
if ((params.onDownloadStartRequest != null ||
params.onDownloadStarting != null) &&
settings.useOnDownloadStart == null) {
settings.useOnDownloadStart = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,19 +346,20 @@ class AndroidInAppWebViewController extends PlatformInAppWebViewController
break;
case "onDownloadStarting":
if ((webviewParams != null &&
(webviewParams!.onDownloadStart != null ||
webviewParams!.onDownloadStartRequest != null ||
webviewParams!.onDownloadStarting != null)) ||
(webviewParams!.onDownloadStart != null ||
webviewParams!.onDownloadStartRequest != null ||
webviewParams!.onDownloadStarting != null)) ||
_inAppBrowserEventHandler != null) {
Map<String, dynamic> arguments =
call.arguments.cast<String, dynamic>();
call.arguments.cast<String, dynamic>();
DownloadStartRequest downloadStartRequest =
DownloadStartRequest.fromMap(arguments)!;
DownloadStartRequest.fromMap(arguments)!;

if (webviewParams != null) {
if (webviewParams!.onDownloadStarting != null)
return (await webviewParams!.onDownloadStarting!(
_controllerFromPlatform, downloadStartRequest))?.toMap();
_controllerFromPlatform, downloadStartRequest))
?.toMap();
else if (webviewParams!.onDownloadStartRequest != null)
webviewParams!.onDownloadStartRequest!(
_controllerFromPlatform, downloadStartRequest);
Expand All @@ -372,7 +373,8 @@ class AndroidInAppWebViewController extends PlatformInAppWebViewController
_inAppBrowserEventHandler!
.onDownloadStartRequest(downloadStartRequest);
return (await _inAppBrowserEventHandler!
.onDownloadStarting(downloadStartRequest))?.toMap();
.onDownloadStarting(downloadStartRequest))
?.toMap();
}
}
break;
Expand Down
4 changes: 2 additions & 2 deletions flutter_inappwebview_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_inappwebview_platform_interface: #^1.4.0-beta.2
path: ../flutter_inappwebview_platform_interface
flutter_inappwebview_platform_interface: ^1.4.0-beta.2
# path: ../flutter_inappwebview_platform_interface

dev_dependencies:
flutter_test:
Expand Down
16 changes: 9 additions & 7 deletions flutter_inappwebview_ios/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,25 @@ packages:
flutter_inappwebview_internal_annotations:
dependency: transitive
description:
path: "../../dev_packages/flutter_inappwebview_internal_annotations"
relative: true
source: path
name: flutter_inappwebview_internal_annotations
sha256: "787171d43f8af67864740b6f04166c13190aa74a1468a1f1f1e9ee5b90c359cd"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
flutter_inappwebview_ios:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "1.2.0-beta.1"
version: "1.2.0-beta.2"
flutter_inappwebview_platform_interface:
dependency: transitive
description:
path: "../../flutter_inappwebview_platform_interface"
relative: true
source: path
name: flutter_inappwebview_platform_interface
sha256: "2c99bf767900ba029d825bc6f494d30169ee83cdaa038d86e85fe70571d0a655"
url: "https://pub.dev"
source: hosted
version: "1.4.0-beta.2"
flutter_lints:
dependency: "direct dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class IOSHeadlessInAppWebViewCreationParams
super.onLoadResource,
super.onScrollChanged,
@Deprecated('Use onDownloadStarting instead') super.onDownloadStart,
@Deprecated('Use onDownloadStarting instead') super.onDownloadStartRequest,
@Deprecated('Use onDownloadStarting instead')
super.onDownloadStartRequest,
super.onDownloadStarting,
@Deprecated('Use onLoadResourceWithCustomScheme instead')
super.onLoadResourceCustomScheme,
Expand Down Expand Up @@ -361,7 +362,8 @@ class IOSHeadlessInAppWebView extends PlatformHeadlessInAppWebView
if (params.onLoadResource != null && settings.useOnLoadResource == null) {
settings.useOnLoadResource = true;
}
if ((params.onDownloadStartRequest != null || params.onDownloadStarting != null) &&
if ((params.onDownloadStartRequest != null ||
params.onDownloadStarting != null) &&
settings.useOnDownloadStart == null) {
settings.useOnDownloadStart = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class IOSInAppWebViewWidgetCreationParams
super.onLoadResource,
super.onScrollChanged,
@Deprecated('Use onDownloadStarting instead') super.onDownloadStart,
@Deprecated('Use onDownloadStarting instead') super.onDownloadStartRequest,
@Deprecated('Use onDownloadStarting instead')
super.onDownloadStartRequest,
super.onDownloadStarting,
@Deprecated('Use onLoadResourceWithCustomScheme instead')
super.onLoadResourceCustomScheme,
Expand Down Expand Up @@ -365,7 +366,8 @@ class IOSInAppWebViewWidget extends PlatformInAppWebViewWidget {
if (params.onLoadResource != null && settings.useOnLoadResource == null) {
settings.useOnLoadResource = true;
}
if ((params.onDownloadStartRequest != null || params.onDownloadStarting != null) &&
if ((params.onDownloadStartRequest != null ||
params.onDownloadStarting != null) &&
settings.useOnDownloadStart == null) {
settings.useOnDownloadStart = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,19 +342,20 @@ class IOSInAppWebViewController extends PlatformInAppWebViewController
break;
case "onDownloadStarting":
if ((webviewParams != null &&
(webviewParams!.onDownloadStart != null ||
webviewParams!.onDownloadStartRequest != null ||
webviewParams!.onDownloadStarting != null)) ||
(webviewParams!.onDownloadStart != null ||
webviewParams!.onDownloadStartRequest != null ||
webviewParams!.onDownloadStarting != null)) ||
_inAppBrowserEventHandler != null) {
Map<String, dynamic> arguments =
call.arguments.cast<String, dynamic>();
call.arguments.cast<String, dynamic>();
DownloadStartRequest downloadStartRequest =
DownloadStartRequest.fromMap(arguments)!;
DownloadStartRequest.fromMap(arguments)!;

if (webviewParams != null) {
if (webviewParams!.onDownloadStarting != null)
return (await webviewParams!.onDownloadStarting!(
_controllerFromPlatform, downloadStartRequest))?.toMap();
_controllerFromPlatform, downloadStartRequest))
?.toMap();
else if (webviewParams!.onDownloadStartRequest != null)
webviewParams!.onDownloadStartRequest!(
_controllerFromPlatform, downloadStartRequest);
Expand All @@ -368,7 +369,8 @@ class IOSInAppWebViewController extends PlatformInAppWebViewController
_inAppBrowserEventHandler!
.onDownloadStartRequest(downloadStartRequest);
return (await _inAppBrowserEventHandler!
.onDownloadStarting(downloadStartRequest))?.toMap();
.onDownloadStarting(downloadStartRequest))
?.toMap();
}
}
break;
Expand Down
4 changes: 2 additions & 2 deletions flutter_inappwebview_ios/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_inappwebview_platform_interface: #^1.4.0-beta.2
path: ../flutter_inappwebview_platform_interface
flutter_inappwebview_platform_interface: ^1.4.0-beta.2
# path: ../flutter_inappwebview_platform_interface

dev_dependencies:
flutter_test:
Expand Down
Loading

0 comments on commit b39c1e7

Please sign in to comment.