From ede1fd426daaf172f30a96f9a4f9cf851a38de3f Mon Sep 17 00:00:00 2001 From: saiful_apx Date: Thu, 8 Dec 2022 21:20:32 +0600 Subject: [PATCH 1/3] upgraded webview_flutter --- pubspec.lock | 67 +++++++++++++++++++++++++++++++++++++++------------- pubspec.yaml | 2 +- 2 files changed, 52 insertions(+), 17 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index e1c3fd8..09e1698 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,7 +21,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -35,14 +35,14 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" crypto: dependency: transitive description: @@ -56,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -94,21 +94,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.8.0" path: dependency: "direct main" description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" pedantic: dependency: transitive description: @@ -116,6 +123,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.11.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" pointer_interceptor: dependency: "direct main" description: @@ -134,7 +148,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -155,21 +169,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.12" typed_data: dependency: transitive description: @@ -190,14 +204,35 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" webview_flutter: dependency: "direct main" description: name: webview_flutter url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "3.0.4" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.10.4" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.5" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + url: "https://pub.dartlang.org" + source: hosted + version: "2.9.5" sdks: - dart: ">=2.13.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 7a05af0..de6629b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: path: ^1.8.0 pointer_interceptor: ^0.9.0+1 uuid: ^3.0.4 - webview_flutter: ^2.0.13 + webview_flutter: ^3.0.4 dev_dependencies: flutter_test: From 6177a364fe2feecaa63ed894437d3d8e7907dcae Mon Sep 17 00:00:00 2001 From: saiful_apx Date: Thu, 8 Dec 2022 21:20:49 +0600 Subject: [PATCH 2/3] Linter fixes and deprecated method changes --- example/ios/Podfile | 41 ++++++++++++++++ example/lib/webview_page.dart | 2 +- example/pubspec.lock | 67 ++++++++++++++++++++------ lib/src/controller/impl/mobile.dart | 9 ++-- lib/src/controller/impl/web.dart | 4 +- lib/src/utils/web_specific_params.dart | 2 - lib/src/view/impl/facade.dart | 2 +- lib/src/view/impl/io.dart | 7 +-- lib/src/view/impl/mobile.dart | 9 ++-- lib/src/view/impl/web.dart | 8 ++- lib/src/view/interface.dart | 2 +- 11 files changed, 107 insertions(+), 46 deletions(-) create mode 100644 example/ios/Podfile diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 0000000..88359b2 --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '11.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/lib/webview_page.dart b/example/lib/webview_page.dart index 01e41b3..f62303f 100644 --- a/example/lib/webview_page.dart +++ b/example/lib/webview_page.dart @@ -59,7 +59,7 @@ class _WebViewXPageState extends State { ), Expanded( child: Scrollbar( - isAlwaysShown: true, + thumbVisibility: true, child: SizedBox( width: min(screenSize.width * 0.8, 512), child: ListView( diff --git a/example/pubspec.lock b/example/pubspec.lock index 9f356e2..132ae5e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,7 +21,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -35,14 +35,14 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" crypto: dependency: transitive description: @@ -63,7 +63,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -101,21 +101,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" pedantic: dependency: transitive description: @@ -123,6 +130,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.11.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" pointer_interceptor: dependency: transitive description: @@ -141,7 +155,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -162,21 +176,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.12" typed_data: dependency: transitive description: @@ -197,14 +211,35 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" webview_flutter: dependency: transitive description: name: webview_flutter url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "3.0.4" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.10.4" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.5" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + url: "https://pub.dartlang.org" + source: hosted + version: "2.9.5" webviewx: dependency: "direct main" description: @@ -213,5 +248,5 @@ packages: source: path version: "0.2.1" sdks: - dart: ">=2.13.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" diff --git a/lib/src/controller/impl/mobile.dart b/lib/src/controller/impl/mobile.dart index d3c2be9..e87418c 100644 --- a/lib/src/controller/impl/mobile.dart +++ b/lib/src/controller/impl/mobile.dart @@ -3,11 +3,8 @@ import 'dart:async' show Future; import 'package:flutter/material.dart'; import 'package:flutter/services.dart' show rootBundle; import 'package:webview_flutter/webview_flutter.dart' as wf; -import 'package:webviewx/src/utils/html_utils.dart'; -import 'package:webviewx/src/utils/source_type.dart'; -import 'package:webviewx/src/utils/utils.dart'; - import 'package:webviewx/src/controller/interface.dart' as i; +import 'package:webviewx/src/utils/utils.dart'; /// Mobile implementation class WebViewXController extends ChangeNotifier @@ -121,7 +118,7 @@ class WebViewXController extends ChangeNotifier ) async { // This basically will transform a "raw" call (evaluateJavascript) // into a little bit more "typed" call, that is - calling a method. - final result = await connector.evaluateJavascript( + final result = await connector.runJavascriptReturningResult( HtmlUtils.buildJsFunction(name, params), ); @@ -144,7 +141,7 @@ class WebViewXController extends ChangeNotifier String rawJavascript, { bool inGlobalContext = false, // NO-OP HERE }) { - return connector.evaluateJavascript(rawJavascript); + return connector.runJavascriptReturningResult(rawJavascript); } /// Returns the current content diff --git a/lib/src/controller/impl/web.dart b/lib/src/controller/impl/web.dart index ec69923..00568fb 100644 --- a/lib/src/controller/impl/web.dart +++ b/lib/src/controller/impl/web.dart @@ -4,13 +4,11 @@ import 'dart:js' as js; import 'package:flutter/material.dart'; import 'package:flutter/services.dart' show rootBundle; +import 'package:webviewx/src/controller/interface.dart' as i; import 'package:webviewx/src/utils/logger.dart'; -import 'package:webviewx/src/utils/source_type.dart'; import 'package:webviewx/src/utils/utils.dart'; import 'package:webviewx/src/utils/web_history.dart'; -import 'package:webviewx/src/controller/interface.dart' as i; - /// Web implementation class WebViewXController extends ChangeNotifier implements i.WebViewXController { diff --git a/lib/src/utils/web_specific_params.dart b/lib/src/utils/web_specific_params.dart index 907caca..8dc6dbd 100644 --- a/lib/src/utils/web_specific_params.dart +++ b/lib/src/utils/web_specific_params.dart @@ -1,5 +1,3 @@ -import 'package:webviewx/src/utils/css_loader.dart'; -import 'package:webviewx/src/utils/source_type.dart'; import 'package:webviewx/src/utils/utils.dart'; /// Parameters specific to the web version. diff --git a/lib/src/view/impl/facade.dart b/lib/src/view/impl/facade.dart index a32dfc0..e15f9ad 100644 --- a/lib/src/view/impl/facade.dart +++ b/lib/src/view/impl/facade.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:webviewx/src/utils/utils.dart'; import 'package:webviewx/src/controller/interface.dart' as ctrl_interface; +import 'package:webviewx/src/utils/utils.dart'; import 'package:webviewx/src/view/interface.dart' as view_interface; /// Facade class diff --git a/lib/src/view/impl/io.dart b/lib/src/view/impl/io.dart index 27e4d5d..4d76b18 100644 --- a/lib/src/view/impl/io.dart +++ b/lib/src/view/impl/io.dart @@ -1,11 +1,8 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:webviewx/src/utils/utils.dart'; - -import 'package:webviewx/src/view/interface.dart' as view_interface; import 'package:webviewx/src/controller/interface.dart' as ctrl_interface; - +import 'package:webviewx/src/utils/utils.dart'; import 'package:webviewx/src/view/impl/mobile.dart' as mobile; +import 'package:webviewx/src/view/interface.dart' as view_interface; /// IO implementation /// diff --git a/lib/src/view/impl/mobile.dart b/lib/src/view/impl/mobile.dart index dc92ccd..8f67f53 100644 --- a/lib/src/view/impl/mobile.dart +++ b/lib/src/view/impl/mobile.dart @@ -1,16 +1,13 @@ import 'dart:async'; import 'dart:io'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:webviewx/src/utils/utils.dart'; - import 'package:webview_flutter/platform_interface.dart' as wf_pi; import 'package:webview_flutter/webview_flutter.dart' as wf; - -import 'package:webviewx/src/view/interface.dart' as view_interface; -import 'package:webviewx/src/controller/interface.dart' as ctrl_interface; import 'package:webviewx/src/controller/impl/mobile.dart'; +import 'package:webviewx/src/controller/interface.dart' as ctrl_interface; +import 'package:webviewx/src/utils/utils.dart'; +import 'package:webviewx/src/view/interface.dart' as view_interface; /// Mobile implementation class WebViewX extends StatefulWidget implements view_interface.WebViewX { diff --git a/lib/src/view/impl/web.dart b/lib/src/view/impl/web.dart index 6f747e5..83e31ba 100644 --- a/lib/src/view/impl/web.dart +++ b/lib/src/view/impl/web.dart @@ -3,17 +3,15 @@ import 'dart:convert'; import 'dart:html' as html; import 'dart:js' as js; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'package:pointer_interceptor/pointer_interceptor.dart'; - -import 'package:webviewx/src/utils/dart_ui_fix.dart' as ui; +import 'package:webviewx/src/controller/impl/web.dart'; +import 'package:webviewx/src/controller/interface.dart' as ctrl_interface; import 'package:webviewx/src/utils/constants.dart'; +import 'package:webviewx/src/utils/dart_ui_fix.dart' as ui; import 'package:webviewx/src/utils/logger.dart'; import 'package:webviewx/src/utils/utils.dart'; -import 'package:webviewx/src/controller/impl/web.dart'; -import 'package:webviewx/src/controller/interface.dart' as ctrl_interface; import 'package:webviewx/src/view/interface.dart' as view_interface; /// Web implementation diff --git a/lib/src/view/interface.dart b/lib/src/view/interface.dart index 4a7661a..5ec7866 100644 --- a/lib/src/view/interface.dart +++ b/lib/src/view/interface.dart @@ -1,5 +1,5 @@ -import 'package:webviewx/src/utils/utils.dart'; import 'package:webviewx/src/controller/interface.dart'; +import 'package:webviewx/src/utils/utils.dart'; /// Interface for widget abstract class WebViewX { From e2b8f4166ee48a4f0d9f985a79cd210767ed6514 Mon Sep 17 00:00:00 2001 From: adar2378 Date: Mon, 4 Dec 2023 22:03:27 +0600 Subject: [PATCH 3/3] refactor: upgrade packages --- example/lib/main.dart | 2 +- example/lib/webview_page.dart | 10 +- example/pubspec.lock | 162 +++++++++-------- lib/src/controller/impl/mobile.dart | 4 +- lib/src/controller/impl/web.dart | 10 +- lib/src/utils/dart_ui_facade.dart | 2 +- lib/src/utils/exposed_dart_variable.dart | 1 + lib/src/utils/html_utils.dart | 21 ++- lib/src/utils/webview_aware.dart | 4 +- lib/src/utils/webview_content_model.dart | 3 +- .../utils/webview_flutter_original_utils.dart | 3 +- lib/src/view/impl/facade.dart | 7 +- lib/src/view/impl/io.dart | 4 +- lib/src/view/impl/mobile.dart | 12 +- lib/src/view/impl/web.dart | 44 +++-- lib/webviewx.dart | 2 - pubspec.lock | 165 +++++++++++------- pubspec.yaml | 12 +- 18 files changed, 271 insertions(+), 197 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index fb1e36b..4ebb27a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'webview_page.dart'; +import 'package:webviewx_example/webview_page.dart'; void main() { runApp(const MyApp()); diff --git a/example/lib/webview_page.dart b/example/lib/webview_page.dart index f62303f..c4f33dc 100644 --- a/example/lib/webview_page.dart +++ b/example/lib/webview_page.dart @@ -3,7 +3,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:webviewx/webviewx.dart'; -import 'helpers.dart'; +import 'package:webviewx_example/helpers.dart'; class WebViewXPage extends StatefulWidget { const WebViewXPage({ @@ -11,7 +11,7 @@ class WebViewXPage extends StatefulWidget { }) : super(key: key); @override - _WebViewXPageState createState() => _WebViewXPageState(); + State createState() => _WebViewXPageState(); } class _WebViewXPageState extends State { @@ -47,11 +47,11 @@ class _WebViewXPageState extends State { padding: const EdgeInsets.only(bottom: 20.0), child: Text( 'Play around with the buttons below', - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), ), buildSpace(direction: Axis.vertical, amount: 10.0, flex: false), - Container( + DecoratedBox( decoration: BoxDecoration( border: Border.all(width: 0.2), ), @@ -102,7 +102,7 @@ class _WebViewXPageState extends State { DartCallback( name: 'TestDartCallback', callBack: (msg) => showSnackBar(msg.toString(), context), - ) + ), }, webSpecificParams: const WebSpecificParams( printDebugInfo: true, diff --git a/example/pubspec.lock b/example/pubspec.lock index 132ae5e..43a55b3 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,63 +5,64 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.18.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.3" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.6" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" flutter: @@ -78,72 +79,74 @@ packages: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.dev" source: hosted - version: "0.13.3" + version: "0.13.6" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" lint: dependency: "direct dev" description: name: lint - url: "https://pub.dartlang.org" + sha256: "4a539aa34ec5721a2c7574ae2ca0336738ea4adc2a34887d54b7596310b33c85" + url: "https://pub.dev" source: hosted - version: "1.6.0" + version: "1.10.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.5.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.10.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.2" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.8.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.7" pointer_interceptor: dependency: transitive description: name: pointer_interceptor - url: "https://pub.dartlang.org" + sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 + url: "https://pub.dev" source: hosted - version: "0.9.0+1" + version: "0.9.3+7" sky_engine: dependency: transitive description: flutter @@ -153,91 +156,112 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.6.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" uuid: dependency: transitive description: name: uuid - url: "https://pub.dartlang.org" + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.0.7" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + url: "https://pub.dev" + source: hosted + version: "0.3.0" webview_flutter: dependency: transitive description: name: webview_flutter - url: "https://pub.dartlang.org" + sha256: "392c1d83b70fe2495de3ea2c84531268d5b8de2de3f01086a53334d8b6030a88" + url: "https://pub.dev" source: hosted version: "3.0.4" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - url: "https://pub.dartlang.org" + sha256: "8b3b2450e98876c70bfcead876d9390573b34b9418c19e28168b74f6cb252dbd" + url: "https://pub.dev" source: hosted version: "2.10.4" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - url: "https://pub.dartlang.org" + sha256: "812165e4e34ca677bdfbfa58c01e33b27fd03ab5fa75b70832d4b7d4ca1fa8cf" + url: "https://pub.dev" source: hosted version: "1.9.5" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - url: "https://pub.dartlang.org" + sha256: a5364369c758892aa487cbf59ea41d9edd10f9d9baf06a94e80f1bd1b4c7bbc0 + url: "https://pub.dev" source: hosted version: "2.9.5" webviewx: @@ -248,5 +272,5 @@ packages: source: path version: "0.2.1" sdks: - dart: ">=2.17.0 <3.0.0" - flutter: ">=3.0.0" + dart: ">=3.2.0-194.0.dev <4.0.0" + flutter: ">=3.13.0" diff --git a/lib/src/controller/impl/mobile.dart b/lib/src/controller/impl/mobile.dart index e87418c..c904254 100644 --- a/lib/src/controller/impl/mobile.dart +++ b/lib/src/controller/impl/mobile.dart @@ -77,10 +77,10 @@ class WebViewXController extends ChangeNotifier bool fromAssets = false, }) async { if (fromAssets) { - final _content = await rootBundle.loadString(content); + final loadedContent = await rootBundle.loadString(content); value = WebViewContent( - source: _content, + source: loadedContent, sourceType: sourceType, headers: headers, ); diff --git a/lib/src/controller/impl/web.dart b/lib/src/controller/impl/web.dart index 00568fb..7e65ca2 100644 --- a/lib/src/controller/impl/web.dart +++ b/lib/src/controller/impl/web.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_dynamic_calls + import 'dart:async' show Future; // ignore: avoid_web_libraries_in_flutter import 'dart:js' as js; @@ -87,10 +89,10 @@ class WebViewXController extends ChangeNotifier WebViewContent newContent; if (fromAssets) { - final _contentFromAssets = await rootBundle.loadString(content); + final contentFromAssets = await rootBundle.loadString(content); newContent = WebViewContent( - source: _contentFromAssets, + source: contentFromAssets, sourceType: sourceType, headers: headers, webPostRequestBody: body, @@ -168,7 +170,7 @@ class WebViewXController extends ChangeNotifier @override Future goBack() async { _history.moveBack(); - log('Current history: ${_history.toString()}'); + log('Current history: $_history'); _notifyWidget(); } @@ -184,7 +186,7 @@ class WebViewXController extends ChangeNotifier @override Future goForward() async { _history.moveForward(); - log('Current history: ${_history.toString()}'); + log('Current history: $_history'); _notifyWidget(); } diff --git a/lib/src/utils/dart_ui_facade.dart b/lib/src/utils/dart_ui_facade.dart index 577ca0c..11788d1 100644 --- a/lib/src/utils/dart_ui_facade.dart +++ b/lib/src/utils/dart_ui_facade.dart @@ -1,5 +1,5 @@ +// ignore_for_file: avoid_classes_with_only_static_members, camel_case_types /// This is here just to suppress the missing warning from "web.dart". -// ignore: camel_case_types class platformViewRegistry { /// See https://github.com/flutter/flutter/issues/41563 for more info static void registerViewFactory( diff --git a/lib/src/utils/exposed_dart_variable.dart b/lib/src/utils/exposed_dart_variable.dart index a04879a..f3c04b6 100644 --- a/lib/src/utils/exposed_dart_variable.dart +++ b/lib/src/utils/exposed_dart_variable.dart @@ -1,3 +1,4 @@ +// ignore_for_file: dangling_library_doc_comments /// TODO /// This will (maybe, eventually) be used in order to expose a Dart variable to JS at startup /// The variable could then be used from the JS side. diff --git a/lib/src/utils/html_utils.dart b/lib/src/utils/html_utils.dart index 56173a6..682b9b9 100644 --- a/lib/src/utils/html_utils.dart +++ b/lib/src/utils/html_utils.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_classes_with_only_static_members, no_leading_underscores_for_local_identifiers + import 'dart:convert'; import 'dart:typed_data'; import 'package:path/path.dart' as p; @@ -110,7 +112,9 @@ class HtmlUtils { /// /// Pretty raw, I know, but it works static String encodeImageAsEmbeddedBase64( - String fileName, Uint8List imageBytes) { + String fileName, + Uint8List imageBytes, + ) { const imageWidth = '100%'; final base64Image = ''; @@ -184,7 +188,10 @@ class HtmlUtils { /// it's attributes (if any), and it will append `toInject` to it, such as the original /// `htmlTag` will now have `toInject` as it's first child (by child we mean HTML DOM child) static String injectAsChildOf( - String htmlTag, String source, String toInject) { + String htmlTag, + String source, + String toInject, + ) { final replaceSpot = '<$htmlTag([^>]*)>'; return source.replaceFirstMapped(RegExp(replaceSpot, caseSensitive: false), (match) { @@ -231,11 +238,13 @@ class HtmlUtils { /// will also call latter iframes' "connect_js_to_flutter" callbacks, thus messing up /// others' functions and, well, everything. static String embedWebIframeJsConnector( - String source, String windowDisambiguator) { + String source, + String windowDisambiguator, + ) { return embedJsInHtmlSource( source, { - 'parent.$jsToDartConnectorFN$windowDisambiguator && parent.$jsToDartConnectorFN$windowDisambiguator(window)' + 'parent.$jsToDartConnectorFN$windowDisambiguator && parent.$jsToDartConnectorFN$windowDisambiguator(window)', }, position: EmbedPosition.aboveHeadCloseTag, ); @@ -261,7 +270,9 @@ class HtmlUtils { /// Embeds click listeners inside the page and calls Dart callback when triggered static String embedClickListenersInPageSource( - String pageUrl, String pageSource) { + String pageUrl, + String pageSource, + ) { return embedInHtmlSource( source: pageSource, whatToEmbed: ''' diff --git a/lib/src/utils/webview_aware.dart b/lib/src/utils/webview_aware.dart index 4dc9012..49436d1 100644 --- a/lib/src/utils/webview_aware.dart +++ b/lib/src/utils/webview_aware.dart @@ -14,10 +14,10 @@ class WebViewAware extends StatelessWidget { /// Constructor const WebViewAware({ - Key? key, + super.key, required this.child, this.debug = false, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/src/utils/webview_content_model.dart b/lib/src/utils/webview_content_model.dart index 670d286..4a983bd 100644 --- a/lib/src/utils/webview_content_model.dart +++ b/lib/src/utils/webview_content_model.dart @@ -1,4 +1,3 @@ -import 'package:flutter/foundation.dart'; import 'package:webviewx/src/utils/source_type.dart'; /// Model class for webview's content @@ -42,7 +41,7 @@ class WebViewContent { String toString() { return 'WebViewContent:\n' 'Source: $source\n' - 'SourceType: ${describeEnum(sourceType)}\n' + 'SourceType: ${sourceType.name}\n' 'Last request Headers: ${headers ?? 'none'}\n' 'Last request Body: ${webPostRequestBody ?? 'none'}\n'; } diff --git a/lib/src/utils/webview_flutter_original_utils.dart b/lib/src/utils/webview_flutter_original_utils.dart index 79f358f..c20f901 100644 --- a/lib/src/utils/webview_flutter_original_utils.dart +++ b/lib/src/utils/webview_flutter_original_utils.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:flutter/foundation.dart'; import 'package:webviewx/src/utils/source_type.dart'; /// A copy from the original webview's navigation delegate typedef @@ -77,7 +76,7 @@ class NavigationContent { @override String toString() { - return 'NavigationContent(source: $source, sourceType: ${describeEnum(sourceType)})'; + return 'NavigationContent(source: $source, sourceType: ${sourceType.name})'; } } diff --git a/lib/src/view/impl/facade.dart b/lib/src/view/impl/facade.dart index e15f9ad..6d5693d 100644 --- a/lib/src/view/impl/facade.dart +++ b/lib/src/view/impl/facade.dart @@ -99,7 +99,7 @@ class WebViewX extends StatelessWidget implements view_interface.WebViewX { /// Constructor const WebViewX({ - Key? key, + super.key, this.initialContent = 'about:blank', this.initialSourceType = SourceType.url, this.userAgent, @@ -118,11 +118,12 @@ class WebViewX extends StatelessWidget implements view_interface.WebViewX { this.onWebResourceError, this.webSpecificParams = const WebSpecificParams(), this.mobileSpecificParams = const MobileSpecificParams(), - }) : super(key: key); + }); @override Widget build(BuildContext context) { throw UnimplementedError( - 'Cannot call build on the facade implementation of WebViewX.'); + 'Cannot call build on the facade implementation of WebViewX.', + ); } } diff --git a/lib/src/view/impl/io.dart b/lib/src/view/impl/io.dart index 4d76b18..7539865 100644 --- a/lib/src/view/impl/io.dart +++ b/lib/src/view/impl/io.dart @@ -102,7 +102,7 @@ class WebViewX extends StatelessWidget implements view_interface.WebViewX { /// Constructor const WebViewX({ - Key? key, + super.key, this.initialContent = 'about:blank', this.initialSourceType = SourceType.url, this.userAgent, @@ -121,7 +121,7 @@ class WebViewX extends StatelessWidget implements view_interface.WebViewX { this.onWebResourceError, this.webSpecificParams = const WebSpecificParams(), this.mobileSpecificParams = const MobileSpecificParams(), - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/src/view/impl/mobile.dart b/lib/src/view/impl/mobile.dart index 8f67f53..60b1b3d 100644 --- a/lib/src/view/impl/mobile.dart +++ b/lib/src/view/impl/mobile.dart @@ -105,7 +105,7 @@ class WebViewX extends StatefulWidget implements view_interface.WebViewX { /// Constructor const WebViewX({ - Key? key, + super.key, this.initialContent = 'about:blank', this.initialSourceType = SourceType.url, this.userAgent, @@ -124,10 +124,10 @@ class WebViewX extends StatefulWidget implements view_interface.WebViewX { this.onWebResourceError, this.webSpecificParams = const WebSpecificParams(), this.mobileSpecificParams = const MobileSpecificParams(), - }) : super(key: key); + }); @override - _WebViewXState createState() => _WebViewXState(); + State createState() => _WebViewXState(); } class _WebViewXState extends State { @@ -185,7 +185,9 @@ class _WebViewXState extends State { final delegate = await widget.navigationDelegate!.call( NavigationRequest( content: NavigationContent( - request.url, webViewXController.value.sourceType), + request.url, + webViewXController.value.sourceType, + ), isForMainFrame: request.isForMainFrame, ), ); @@ -210,7 +212,7 @@ class _WebViewXState extends State { webViewXController.connector = originalWebViewController; // Calls onWebViewCreated to pass the refference upstream if (widget.onWebViewCreated != null) { - widget.onWebViewCreated!(webViewXController); + widget.onWebViewCreated?.call(webViewXController); } } diff --git a/lib/src/view/impl/web.dart b/lib/src/view/impl/web.dart index 83e31ba..bc17eb1 100644 --- a/lib/src/view/impl/web.dart +++ b/lib/src/view/impl/web.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_dynamic_calls + import 'dart:async'; import 'dart:convert'; import 'dart:html' as html; @@ -110,7 +112,7 @@ class WebViewX extends StatefulWidget implements view_interface.WebViewX { /// Constructor const WebViewX({ - Key? key, + super.key, this.initialContent = 'about:blank', this.initialSourceType = SourceType.url, this.userAgent, @@ -129,10 +131,10 @@ class WebViewX extends StatefulWidget implements view_interface.WebViewX { this.onWebResourceError, this.webSpecificParams = const WebSpecificParams(), this.mobileSpecificParams = const MobileSpecificParams(), - }) : super(key: key); + }); @override - _WebViewXState createState() => _WebViewXState(); + State createState() => _WebViewXState(); } class _WebViewXState extends State { @@ -421,7 +423,6 @@ class _WebViewXState extends State { windowDisambiguator: iframeViewType, forWeb: true, ); - break; case SourceType.url: case SourceType.urlBypass: if (source == 'about:blank') { @@ -448,7 +449,6 @@ class _WebViewXState extends State { headers: model.headers, ); } - break; } } @@ -458,7 +458,9 @@ class _WebViewXState extends State { _debugLog(dartObj.toString()); if (!await _checkNavigationAllowed( - href, webViewXController.value.sourceType)) { + href, + webViewXController.value.sourceType, + )) { _debugLog('Navigation not allowed for source:\n$href\n'); return; } @@ -508,22 +510,26 @@ class _WebViewXState extends State { ).then((source) { _setPageSourceAfterBypass(url, source); - webViewXController.webRegisterNewHistoryEntry(WebViewContent( - source: url, - sourceType: SourceType.urlBypass, - headers: headers, - webPostRequestBody: body, - )); + webViewXController.webRegisterNewHistoryEntry( + WebViewContent( + source: url, + sourceType: SourceType.urlBypass, + headers: headers, + webPostRequestBody: body, + ), + ); _debugLog('Got a new history entry: $url\n'); }).catchError((e) { - widget.onWebResourceError?.call(WebResourceError( - description: 'Failed to fetch the page at $url\nError:\n$e\n', - errorCode: WebResourceErrorType.connect.index, - errorType: WebResourceErrorType.connect, - domain: Uri.parse(url).authority, - failingUrl: url, - )); + widget.onWebResourceError?.call( + WebResourceError( + description: 'Failed to fetch the page at $url\nError:\n$e\n', + errorCode: WebResourceErrorType.connect.index, + errorType: WebResourceErrorType.connect, + domain: Uri.parse(url).authority, + failingUrl: url, + ), + ); _debugLog('Failed to fetch the page at $url\nError:\n$e\n'); }); } diff --git a/lib/webviewx.dart b/lib/webviewx.dart index 9bc14cf..fceb708 100644 --- a/lib/webviewx.dart +++ b/lib/webviewx.dart @@ -1,5 +1,3 @@ -library webviewx; - export 'src/controller/controller.dart'; export 'src/utils/utils.dart'; export 'src/view/view.dart'; diff --git a/pubspec.lock b/pubspec.lock index 09e1698..99e98ea 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,56 +5,56 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.18.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.3" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" flutter: @@ -71,72 +71,74 @@ packages: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 + url: "https://pub.dev" source: hosted - version: "0.13.3" + version: "1.1.2" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" lint: dependency: "direct dev" description: name: lint - url: "https://pub.dartlang.org" + sha256: "77b3777e8e9adca8e942da1e835882ae3248dfa00488a2ebbdbc1f1a4aa3f4a7" + url: "https://pub.dev" source: hosted - version: "1.6.0" + version: "2.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.5.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.10.0" path: dependency: "direct main" description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" + version: "1.8.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.7" pointer_interceptor: dependency: "direct main" description: name: pointer_interceptor - url: "https://pub.dartlang.org" + sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 + url: "https://pub.dev" source: hosted - version: "0.9.0+1" + version: "0.9.3+7" sky_engine: dependency: transitive description: flutter @@ -146,93 +148,122 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "7.0.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.6.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" uuid: dependency: "direct main" description: name: uuid - url: "https://pub.dartlang.org" + sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921 + url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "4.2.1" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + url: "https://pub.dev" + source: hosted + version: "0.3.0" webview_flutter: dependency: "direct main" description: name: webview_flutter - url: "https://pub.dartlang.org" + sha256: "392c1d83b70fe2495de3ea2c84531268d5b8de2de3f01086a53334d8b6030a88" + url: "https://pub.dev" source: hosted version: "3.0.4" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - url: "https://pub.dartlang.org" + sha256: "8b3b2450e98876c70bfcead876d9390573b34b9418c19e28168b74f6cb252dbd" + url: "https://pub.dev" source: hosted version: "2.10.4" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - url: "https://pub.dartlang.org" + sha256: "812165e4e34ca677bdfbfa58c01e33b27fd03ab5fa75b70832d4b7d4ca1fa8cf" + url: "https://pub.dev" source: hosted version: "1.9.5" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - url: "https://pub.dartlang.org" + sha256: a5364369c758892aa487cbf59ea41d9edd10f9d9baf06a94e80f1bd1b4c7bbc0 + url: "https://pub.dev" source: hosted version: "2.9.5" sdks: - dart: ">=2.17.0 <3.0.0" - flutter: ">=3.0.0" + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml index de6629b..4cc36aa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,19 +5,19 @@ homepage: https://github.com/adrianflutur/webviewx version: 0.2.1 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" flutter: ">=1.17.0" dependencies: flutter: sdk: flutter - http: ^0.13.3 - path: ^1.8.0 - pointer_interceptor: ^0.9.0+1 - uuid: ^3.0.4 + http: ^1.1.2 + path: ^1.8.3 + pointer_interceptor: ^0.9.3+7 + uuid: ^4.2.1 webview_flutter: ^3.0.4 dev_dependencies: flutter_test: sdk: flutter - lint: ^1.6.0 + lint: ^2.2.0