From 78232532543cda394c1de7a225e003c42fddebec Mon Sep 17 00:00:00 2001 From: Mohamed Dawood Date: Sun, 28 May 2023 23:45:22 +0300 Subject: [PATCH] ... --- .flutter-plugins | 2 +- .flutter-plugins-dependencies | 2 +- example/.flutter-plugins | 2 +- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 19 ++++++++++++++++--- lib/ui/web_view_page.dart | 24 +++++++++--------------- pubspec.lock | 17 +++++++++++++++-- pubspec.yaml | 4 ++-- 8 files changed, 46 insertions(+), 26 deletions(-) diff --git a/.flutter-plugins b/.flutter-plugins index 7d8a625..bff024a 100644 --- a/.flutter-plugins +++ b/.flutter-plugins @@ -1,2 +1,2 @@ # This is a generated file; do not edit or check into version control. -flutter_inappwebview=/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.7.2+3/ +flutter_inappwebview=/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/ diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index b14660a..df70565 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.7.2+3/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.7.2+3/","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_inappwebview","dependencies":[]}],"date_created":"2023-05-25 14:24:17.783256","version":"3.10.0"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/","native_build":true,"dependencies":[]}],"macos":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_inappwebview","dependencies":[]}],"date_created":"2023-05-28 23:44:56.205665","version":"3.10.2"} \ No newline at end of file diff --git a/example/.flutter-plugins b/example/.flutter-plugins index 7d8a625..bff024a 100644 --- a/example/.flutter-plugins +++ b/example/.flutter-plugins @@ -1,2 +1,2 @@ # This is a generated file; do not edit or check into version control. -flutter_inappwebview=/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.7.2+3/ +flutter_inappwebview=/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/ diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 49bff4b..11563db 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.7.2+3/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.7.2+3/","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_inappwebview","dependencies":[]}],"date_created":"2023-05-25 14:24:17.842235","version":"3.10.0"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/","native_build":true,"dependencies":[]}],"macos":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"flutter_inappwebview","path":"/Users/mohamed_dawood/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0-beta.23/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_inappwebview","dependencies":[]}],"date_created":"2023-05-28 23:44:56.270424","version":"3.10.2"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 9a8f8cd..1f9258f 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -42,10 +42,18 @@ packages: dependency: transitive description: name: flutter_inappwebview - sha256: f73505c792cf083d5566e1a94002311be497d984b5607f25be36d685cf6361cf + sha256: "48d916e60b17649e338ac94f5d85fd28af8673a4a03d303d178dc61aa2a1f1c8" url: "https://pub.dev" source: hosted - version: "5.7.2+3" + version: "6.0.0-beta.23" + flutter_inappwebview_internal_annotations: + dependency: transitive + description: + name: flutter_inappwebview_internal_annotations + sha256: "064a8ccbc76217dcd3b0fd6c6ea6f549e69b2849a0233b5bb46af9632c3ce2ff" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter_lints: dependency: "direct dev" description: @@ -54,6 +62,11 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" http: dependency: transitive description: @@ -108,7 +121,7 @@ packages: path: ".." relative: true source: path - version: "3.3.0" + version: "3.4.0-beta.1" path: dependency: transitive description: diff --git a/lib/ui/web_view_page.dart b/lib/ui/web_view_page.dart index 983bf85..e806b1e 100644 --- a/lib/ui/web_view_page.dart +++ b/lib/ui/web_view_page.dart @@ -154,15 +154,11 @@ class __WebViewPageState extends State<_WebViewPage> ), Expanded( child: InAppWebView( - initialUrlRequest: URLRequest(url: widget.uri), - initialOptions: InAppWebViewGroupOptions( - crossPlatform: InAppWebViewOptions( - javaScriptEnabled: true, - javaScriptCanOpenWindowsAutomatically: true, - ), - ios: IOSInAppWebViewOptions( - applePayAPIEnabled: true, - ), + initialUrlRequest: URLRequest(url: WebUri(widget.uri.toString())), + initialSettings: InAppWebViewSettings( + javaScriptEnabled: true, + javaScriptCanOpenWindowsAutomatically: true, + applePayAPIEnabled: true, ), onWebViewCreated: (InAppWebViewController controller) { this.controller = controller; @@ -182,13 +178,11 @@ class __WebViewPageState extends State<_WebViewPage> }); } }, - onLoadError: (InAppWebViewController controller, Uri? uri, - int status, String error) { - setError(uri, error); + onReceivedError: (controller, request, error) { + setError(request.url, error.description); }, - onLoadHttpError: (InAppWebViewController controller, Uri? uri, - int status, String error) { - setError(uri, error); + onReceivedHttpError: (controller, request, error) { + setError(request.url, error.reasonPhrase ?? ''); }, onLoadStop: (InAppWebViewController controller, Uri? uri) { setStop(uri); diff --git a/pubspec.lock b/pubspec.lock index e62bd24..46372c9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -66,15 +66,28 @@ packages: dependency: "direct main" description: name: flutter_inappwebview - sha256: f73505c792cf083d5566e1a94002311be497d984b5607f25be36d685cf6361cf + sha256: "48d916e60b17649e338ac94f5d85fd28af8673a4a03d303d178dc61aa2a1f1c8" url: "https://pub.dev" source: hosted - version: "5.7.2+3" + version: "6.0.0-beta.23" + flutter_inappwebview_internal_annotations: + dependency: transitive + description: + name: flutter_inappwebview_internal_annotations + sha256: "064a8ccbc76217dcd3b0fd6c6ea6f549e69b2849a0233b5bb46af9632c3ce2ff" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" http: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 283c4aa..6b64067 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: my_fatoorah description: My Fatoorah Payment SDK Integration works for android and ios -version: 3.3.0 +version: 3.4.0-beta.1 homepage: https://github.com/mo-ah-dawood/my_fatoorah environment: @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - flutter_inappwebview: ^5.7.2+3 + flutter_inappwebview: ^6.0.0-beta.23 dev_dependencies: lints: ^2.1.0