From af6c409e261153312605f7a544597ee302f4c3ca Mon Sep 17 00:00:00 2001 From: kodjomoustapha <107993382+kodjodevf@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:32:50 +0100 Subject: [PATCH] #294 --- lib/main.dart | 15 +- lib/modules/webview/webview.dart | 367 ++++++++---------- lib/services/http/m_client.dart | 27 +- pubspec.lock | 159 ++++---- pubspec.yaml | 37 +- .../flutter/generated_plugin_registrant.cc | 3 - windows/flutter/generated_plugins.cmake | 1 - 7 files changed, 306 insertions(+), 303 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index c33fa4b..0ebbb7f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,6 +3,7 @@ import 'package:bot_toast/bot_toast.dart'; import 'package:flex_color_scheme/flex_color_scheme.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:intl/date_symbol_data_local.dart'; @@ -21,10 +22,12 @@ import 'package:mangayomi/services/sync_server.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:mangayomi/src/rust/frb_generated.dart'; import 'package:media_kit/media_kit.dart'; +import 'package:path_provider/path_provider.dart'; import 'package:window_manager/window_manager.dart'; +import 'package:path/path.dart' as p; late Isar isar; - +WebViewEnvironment? webViewEnvironment; void main(List args) async { WidgetsFlutterBinding.ensureInitialized(); MediaKit.ensureInitialized(); @@ -32,7 +35,15 @@ void main(List args) async { if (!(Platform.isAndroid || Platform.isIOS)) { await windowManager.ensureInitialized(); } - + if (!kIsWeb && defaultTargetPlatform == TargetPlatform.windows) { + final availableVersion = await WebViewEnvironment.getAvailableVersion(); + assert(availableVersion != null, + 'Failed to find an installed WebView2 runtime or non-stable Microsoft Edge installation.'); + final document = await getApplicationDocumentsDirectory(); + webViewEnvironment = await WebViewEnvironment.create( + settings: WebViewEnvironmentSettings( + userDataFolder: p.join(document.path, 'flutter_inappwebview'))); + } isar = await StorageProvider().initDB(null, inspector: kDebugMode); await StorageProvider().requestPermission(); GoogleFonts.aBeeZee(); diff --git a/lib/modules/webview/webview.dart b/lib/modules/webview/webview.dart index 2d53805..9914333 100644 --- a/lib/modules/webview/webview.dart +++ b/lib/modules/webview/webview.dart @@ -1,10 +1,8 @@ -// ignore_for_file: depend_on_referenced_packages -import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_windows_webview/flutter_windows_webview.dart'; import 'package:go_router/go_router.dart'; +import 'package:mangayomi/main.dart'; import 'package:mangayomi/providers/l10n_providers.dart'; import 'package:mangayomi/services/http/m_client.dart'; import 'package:mangayomi/utils/global_style.dart'; @@ -22,35 +20,6 @@ class MangaWebView extends ConsumerStatefulWidget { class _MangaWebViewState extends ConsumerState { double _progress = 0; - @override - void initState() { - if (Platform.isWindows) { - _runWindowWebView(); - } - super.initState(); - } - - final _windowsWebview = FlutterWindowsWebview(); - void _runWindowWebView() async { - //credit: https://github.com/wgh136/PicaComic/blob/master/lib/network/nhentai_network/cloudflare.dart - if (await FlutterWindowsWebview.isAvailable()) { - _windowsWebview.launchWebview( - widget.url, - WebviewOptions(messageReceiver: (s) { - if (s.substring(0, 2) == "UA") { - MClient.setCookie(_url, s.replaceFirst("UA", "")); - } - }, onTitleChange: (_) { - _windowsWebview.runScript( - "window.chrome.webview.postMessage(\"UA\" + navigator.userAgent)"); - _windowsWebview.getCookies(widget.url).then((cookies) { - final cookie = - cookies.entries.map((e) => "${e.key}=${e.value}").join("; "); - MClient.setCookie(_url, "", cookie: cookie); - }); - })); - } - } InAppWebViewController? _webViewController; late String _url = widget.url; @@ -60,188 +29,170 @@ class _MangaWebViewState extends ConsumerState { @override Widget build(BuildContext context) { final l10n = l10nLocalizations(context); - return Platform.isWindows - ? Scaffold( - appBar: AppBar( - title: Text( - _title, - style: const TextStyle( - overflow: TextOverflow.ellipsis, - fontWeight: FontWeight.bold), - ), - leading: IconButton( - onPressed: () { - Navigator.pop(context); - }, - icon: const Icon(Icons.close)), - ), - ) - : Material( - child: SafeArea( - child: WillPopScope( - onWillPop: () async { - final canGoback = await _webViewController?.canGoBack(); - if (canGoback ?? false) { - _webViewController?.goBack(); - } else if (context.mounted) { - context.pop(); - } - return false; - }, - child: Column( + return Material( + child: SafeArea( + child: WillPopScope( + onWillPop: () async { + final canGoback = await _webViewController?.canGoBack(); + if (canGoback ?? false) { + _webViewController?.goBack(); + } else if (context.mounted) { + context.pop(); + } + return false; + }, + child: Column( + children: [ + SizedBox( + height: AppBar().preferredSize.height, + child: Row( children: [ - SizedBox( - height: AppBar().preferredSize.height, - child: Row( - children: [ - Expanded( - child: ListTile( - dense: true, - subtitle: Text( - _url, - style: const TextStyle( - fontSize: 10, - overflow: TextOverflow.ellipsis), - ), - title: Text( - _title, - style: const TextStyle( - overflow: TextOverflow.ellipsis, - fontWeight: FontWeight.bold), - ), - leading: IconButton( - onPressed: () { - Navigator.pop(context); - }, - icon: const Icon(Icons.close)), - ), - ), - IconButton( - icon: Icon(Icons.arrow_back, - color: _canGoback ? null : Colors.grey), - onPressed: _canGoback - ? () { - _webViewController?.goBack(); - } - : null, - ), - IconButton( - icon: Icon(Icons.arrow_forward, - color: _canGoForward ? null : Colors.grey), - onPressed: _canGoForward - ? () { - _webViewController?.goForward(); - } - : null, - ), - PopupMenuButton( - popUpAnimationStyle: popupAnimationStyle, - itemBuilder: (context) { - return [ - PopupMenuItem( - value: 0, child: Text(l10n!.refresh)), - PopupMenuItem( - value: 1, child: Text(l10n.share)), - PopupMenuItem( - value: 2, - child: Text(l10n.open_in_browser)), - PopupMenuItem( - value: 3, child: Text(l10n.clear_cookie)), - ]; - }, - onSelected: (value) async { - if (value == 0) { - _webViewController?.reload(); - } else if (value == 1) { - Share.share(_url); - } else if (value == 2) { - await InAppBrowser.openWithSystemBrowser( - url: WebUri(_url)); - } else if (value == 3) { - CookieManager.instance().deleteAllCookies(); - MClient.deleteAllCookies(_url); - } - }), - ], - ), - ), - _progress < 1.0 - ? LinearProgressIndicator(value: _progress) - : Container(), Expanded( - child: InAppWebView( - onWebViewCreated: (controller) async { - _webViewController = controller; - }, - onLoadStart: (controller, url) async { - setState(() { - _url = url.toString(); - }); - }, - shouldOverrideUrlLoading: - (controller, navigationAction) async { - var uri = navigationAction.request.url!; - - if (![ - "http", - "https", - "file", - "chrome", - "data", - "javascript", - "about" - ].contains(uri.scheme)) { - if (await canLaunchUrl(uri)) { - // Launch the App - await launchUrl( - uri, - ); - // and cancel the request - return NavigationActionPolicy.CANCEL; - } - } - - return NavigationActionPolicy.ALLOW; - }, - onLoadStop: (controller, url) async { - if (mounted) { - setState(() { - _url = url.toString(); - }); - } - }, - onProgressChanged: (controller, progress) async { - if (mounted) { - setState(() { - _progress = progress / 100; - }); - } - }, - onUpdateVisitedHistory: - (controller, url, isReload) async { - final ua = await controller.evaluateJavascript( - source: "navigator.userAgent") ?? - ""; - await MClient.setCookie(url.toString(), ua); - final canGoback = await controller.canGoBack(); - final canGoForward = await controller.canGoForward(); - final title = await controller.getTitle(); - if (mounted) { - setState(() { - _url = url.toString(); - _title = title!; - _canGoback = canGoback; - _canGoForward = canGoForward; - }); - } - }, - initialUrlRequest: URLRequest(url: WebUri(widget.url)), + child: ListTile( + dense: true, + subtitle: Text( + _url, + style: const TextStyle( + fontSize: 10, overflow: TextOverflow.ellipsis), + ), + title: Text( + _title, + style: const TextStyle( + overflow: TextOverflow.ellipsis, + fontWeight: FontWeight.bold), + ), + leading: IconButton( + onPressed: () { + Navigator.pop(context); + }, + icon: const Icon(Icons.close)), ), ), + IconButton( + icon: Icon(Icons.arrow_back, + color: _canGoback ? null : Colors.grey), + onPressed: _canGoback + ? () { + _webViewController?.goBack(); + } + : null, + ), + IconButton( + icon: Icon(Icons.arrow_forward, + color: _canGoForward ? null : Colors.grey), + onPressed: _canGoForward + ? () { + _webViewController?.goForward(); + } + : null, + ), + PopupMenuButton( + popUpAnimationStyle: popupAnimationStyle, + itemBuilder: (context) { + return [ + PopupMenuItem( + value: 0, child: Text(l10n!.refresh)), + PopupMenuItem( + value: 1, child: Text(l10n.share)), + PopupMenuItem( + value: 2, child: Text(l10n.open_in_browser)), + PopupMenuItem( + value: 3, child: Text(l10n.clear_cookie)), + ]; + }, + onSelected: (value) async { + if (value == 0) { + _webViewController?.reload(); + } else if (value == 1) { + Share.share(_url); + } else if (value == 2) { + await InAppBrowser.openWithSystemBrowser( + url: WebUri(_url)); + } else if (value == 3) { + CookieManager.instance().deleteAllCookies(); + MClient.deleteAllCookies(_url); + } + }), ], ), ), - ), - ); + _progress < 1.0 + ? LinearProgressIndicator(value: _progress) + : Container(), + Expanded( + child: InAppWebView( + webViewEnvironment: webViewEnvironment, + onWebViewCreated: (controller) async { + _webViewController = controller; + }, + onLoadStart: (controller, url) async { + setState(() { + _url = url.toString(); + }); + }, + shouldOverrideUrlLoading: + (controller, navigationAction) async { + var uri = navigationAction.request.url!; + + if (![ + "http", + "https", + "file", + "chrome", + "data", + "javascript", + "about" + ].contains(uri.scheme)) { + if (await canLaunchUrl(uri)) { + // Launch the App + await launchUrl( + uri, + ); + // and cancel the request + return NavigationActionPolicy.CANCEL; + } + } + + return NavigationActionPolicy.ALLOW; + }, + onLoadStop: (controller, url) async { + if (mounted) { + setState(() { + _url = url.toString(); + }); + } + }, + onProgressChanged: (controller, progress) async { + if (mounted) { + setState(() { + _progress = progress / 100; + }); + } + }, + onUpdateVisitedHistory: (controller, url, isReload) async { + final ua = await controller.evaluateJavascript( + source: "navigator.userAgent") ?? + ""; + await MClient.setCookie(url.toString(), ua); + final canGoback = await controller.canGoBack(); + final canGoForward = await controller.canGoForward(); + final title = await controller.getTitle(); + if (mounted) { + setState(() { + _url = url.toString(); + _title = title!; + _canGoback = canGoback; + _canGoForward = canGoForward; + }); + } + }, + initialUrlRequest: URLRequest(url: WebUri(widget.url)), + ), + ), + ], + ), + ), + ), + ); } } diff --git a/lib/services/http/m_client.dart b/lib/services/http/m_client.dart index e6af858..1bb211e 100644 --- a/lib/services/http/m_client.dart +++ b/lib/services/http/m_client.dart @@ -8,6 +8,7 @@ import 'package:flutter_inappwebview/flutter_inappwebview.dart' as flutter_inappwebview; import 'package:mangayomi/models/settings.dart'; import 'package:http/io_client.dart'; +import 'package:mangayomi/utils/extensions/string_extensions.dart'; import 'package:mangayomi/utils/log/log.dart'; import 'package:mangayomi/services/http/rhttp/rhttp.dart' as rhttp; @@ -67,17 +68,17 @@ class MClient { static Future setCookie(String url, String ua, {String? cookie}) async { List cookies = []; + final cookieList = (await flutter_inappwebview.CookieManager.instance( + webViewEnvironment: webViewEnvironment) + .getCookies(url: flutter_inappwebview.WebUri(url))); if (Platform.isWindows) { - cookies = cookie - ?.split(RegExp('(?<=)(,)(?=[^;]+?=)')) - .where((cookie) => cookie.isNotEmpty) - .toList() ?? - []; - } else { - cookies = (await flutter_inappwebview.CookieManager.instance() - .getCookies(url: flutter_inappwebview.WebUri(url))) + cookies = cookieList + .where((e) => + ((e.domain ?? "").substringAfter(".") == Uri.parse(url).host)) .map((e) => "${e.name}=${e.value}") .toList(); + } else { + cookies = cookieList.map((e) => "${e.name}=${e.value}").toList(); } if (cookies.isNotEmpty) { @@ -192,3 +193,13 @@ class LoggerInterceptor extends InterceptorContract { return response; } } + +String _cleanText(String text) { + return text + .trim() + .replaceAll( + RegExp( + r'[\u0000-\u001F\u007F-\u009F\u00A0\u200B-\u200D\u2060\uFEFF]'), + '') + .replaceAll(RegExp(r'\s+'), ' '); +} diff --git a/pubspec.lock b/pubspec.lock index 09863e9..83d0f2f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -58,10 +58,10 @@ packages: dependency: transitive description: name: asn1lib - sha256: bf1a19d6ebea1b3b6151304936955d7d73e1f00b75e544c01a60fb2e832ffe1d + sha256: "4bae5ae63e6d6dd17c4aac8086f3dec26c0236f6a0f03416c6c19d830c367cf5" url: "https://pub.dev" source: hosted - version: "1.5.6" + version: "1.5.8" async: dependency: transitive description: @@ -166,6 +166,14 @@ packages: url: "https://pub.dev" source: hosted version: "8.9.2" + change_case: + dependency: transitive + description: + name: change_case + sha256: "99cfdf2018c627c8a3af5a23ea4c414eb69c75c31322d23b9660ebc3cf30b514" + url: "https://pub.dev" + source: hosted + version: "2.1.0" characters: dependency: transitive description: @@ -282,10 +290,10 @@ packages: dependency: "direct main" description: name: dart_eval - sha256: "4dd114e350fb24a9fdfef1e93c7f491f6eb1ed34633f102a7c0a34486126b602" + sha256: bbad8246a99a3c61925e19b3d2c2bd6311f8186fb4642a16bf3d22153b3ade55 url: "https://pub.dev" source: hosted - version: "0.7.9" + version: "0.7.10" dart_style: dependency: transitive description: @@ -314,10 +322,10 @@ packages: dependency: transitive description: name: directed_graph - sha256: fcb45029b4a5089d383b79056b6716d6bf5af79b8e7dbac4b61d26af46410548 + sha256: "3718b9f697a8e73890dea3d93edb6d58b63778996306b4b19c575710e3e2523d" url: "https://pub.dev" source: hosted - version: "0.4.3" + version: "0.4.4" draggable_menu: dependency: "direct main" description: @@ -370,10 +378,10 @@ packages: dependency: "direct main" description: name: extended_image - sha256: bd4d1aa63ab0816091d95fc47e8d44731bf683b03578dbc1d7a9dc3b91c7f62f + sha256: "613875dc319f17546ea07499b5f0774755709a19a36dfde812e5eda9eb7a5c8c" url: "https://pub.dev" source: hosted - version: "9.0.4" + version: "9.0.7" extended_image_library: dependency: transitive description: @@ -418,10 +426,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: aac85f20436608e01a6ffd1fdd4e746a7f33c93a2c83752e626bdfaea139b877 + sha256: "16dc141db5a2ccc6520ebb6a2eb5945b1b09e95085c021d9f914f8ded7f1465c" url: "https://pub.dev" source: hosted - version: "8.1.3" + version: "8.1.4" fixnum: dependency: transitive description: @@ -470,67 +478,75 @@ packages: flutter_inappwebview: dependency: "direct main" description: - name: flutter_inappwebview - sha256: "80092d13d3e29b6227e25b67973c67c7210bd5e35c4b747ca908e31eb71a46d5" - url: "https://pub.dev" - source: hosted - version: "6.1.5" + path: flutter_inappwebview + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + resolved-ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + url: "https://github.com/pichillilorenzo/flutter_inappwebview.git" + source: git + version: "6.2.0-beta.2" flutter_inappwebview_android: - dependency: transitive + dependency: "direct overridden" description: - name: flutter_inappwebview_android - sha256: "62557c15a5c2db5d195cb3892aab74fcaec266d7b86d59a6f0027abd672cddba" - url: "https://pub.dev" - source: hosted - version: "1.1.3" + path: flutter_inappwebview_android + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + resolved-ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + url: "https://github.com/pichillilorenzo/flutter_inappwebview.git" + source: git + version: "1.2.0-beta.2" flutter_inappwebview_internal_annotations: dependency: transitive description: - name: flutter_inappwebview_internal_annotations - sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8" - url: "https://pub.dev" - source: hosted - version: "1.1.1" + path: "dev_packages/flutter_inappwebview_internal_annotations" + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + resolved-ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + url: "https://github.com/pichillilorenzo/flutter_inappwebview.git" + source: git + version: "1.2.0" flutter_inappwebview_ios: - dependency: transitive + dependency: "direct overridden" description: - name: flutter_inappwebview_ios - sha256: "5818cf9b26cf0cbb0f62ff50772217d41ea8d3d9cc00279c45f8aabaa1b4025d" - url: "https://pub.dev" - source: hosted - version: "1.1.2" + path: flutter_inappwebview_ios + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + resolved-ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + url: "https://github.com/pichillilorenzo/flutter_inappwebview.git" + source: git + version: "1.2.0-beta.2" flutter_inappwebview_macos: - dependency: transitive + dependency: "direct overridden" description: - name: flutter_inappwebview_macos - sha256: c1fbb86af1a3738e3541364d7d1866315ffb0468a1a77e34198c9be571287da1 - url: "https://pub.dev" - source: hosted - version: "1.1.2" + path: flutter_inappwebview_macos + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + resolved-ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + url: "https://github.com/pichillilorenzo/flutter_inappwebview.git" + source: git + version: "1.2.0-beta.2" flutter_inappwebview_platform_interface: - dependency: transitive + dependency: "direct overridden" description: - name: flutter_inappwebview_platform_interface - sha256: cf5323e194096b6ede7a1ca808c3e0a078e4b33cc3f6338977d75b4024ba2500 - url: "https://pub.dev" - source: hosted - version: "1.3.0+1" + path: flutter_inappwebview_platform_interface + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + resolved-ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + url: "https://github.com/pichillilorenzo/flutter_inappwebview.git" + source: git + version: "1.4.0-beta.2" flutter_inappwebview_web: dependency: transitive description: - name: flutter_inappwebview_web - sha256: "55f89c83b0a0d3b7893306b3bb545ba4770a4df018204917148ebb42dc14a598" - url: "https://pub.dev" - source: hosted - version: "1.1.2" + path: flutter_inappwebview_web + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + resolved-ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + url: "https://github.com/pichillilorenzo/flutter_inappwebview.git" + source: git + version: "1.2.0-beta.2" flutter_inappwebview_windows: - dependency: transitive + dependency: "direct overridden" description: - name: flutter_inappwebview_windows - sha256: "8b4d3a46078a2cdc636c4a3d10d10f2a16882f6be607962dbfff8874d1642055" - url: "https://pub.dev" - source: hosted - version: "0.6.0" + path: flutter_inappwebview_windows + ref: fix_windows_get_cookies + resolved-ref: "22dfdc54d26001a739030ca261284837ef7e923f" + url: "https://github.com/kodjodevf/flutter_inappwebview.git" + source: git + version: "0.7.0-beta.2" flutter_launcher_icons: dependency: "direct dev" description: @@ -611,23 +627,14 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_windows_webview: - dependency: "direct main" - description: - path: "." - ref: master - resolved-ref: "8673cc315b569ddba37527d9d5414ea9c5a0954f" - url: "https://github.com/wgh136/flutter_windows_webview" - source: git - version: "0.0.1" font_awesome_flutter: dependency: "direct main" description: name: font_awesome_flutter - sha256: "275ff26905134bcb59417cf60ad979136f1f8257f2f449914b2c3e05bbb4cd6f" + sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a url: "https://pub.dev" source: hosted - version: "10.7.0" + version: "10.8.0" freezed: dependency: "direct dev" description: @@ -664,10 +671,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "6f1b756f6e863259a99135ff3c95026c3cdca17d10ebef2bba2261a25ddc8bbc" + sha256: ce89c5a993ca5eea74535f798478502c30a625ecb10a1de4d7fef5cd1bcac2a4 url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "14.4.1" google_fonts: dependency: "direct main" description: @@ -1067,10 +1074,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: df3eb3e0aed5c1107bb0fdb80a8e82e778114958b1c5ac5644fb1ac9cae8a998 + sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce url: "https://pub.dev" source: hosted - version: "8.1.0" + version: "8.1.1" package_info_plus_platform_interface: dependency: transitive description: @@ -1402,10 +1409,10 @@ packages: dependency: "direct main" description: name: share_plus - sha256: "3af2cda1752e5c24f2fc04b6083b40f013ffe84fb90472f30c6499a9213d5442" + sha256: "9c9bafd4060728d7cdb2464c341743adbd79d327cb067ec7afb64583540b47c8" url: "https://pub.dev" source: hosted - version: "10.1.1" + version: "10.1.2" share_plus_platform_interface: dependency: transitive description: @@ -1591,10 +1598,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "0dea215895a4d254401730ca0ba8204b29109a34a99fb06ae559a2b60988d2de" + sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" url: "https://pub.dev" source: hosted - version: "6.3.13" + version: "6.3.14" url_launcher_ios: dependency: transitive description: @@ -1727,10 +1734,10 @@ packages: dependency: transitive description: name: win32 - sha256: "10169d3934549017f0ae278ccb07f828f9d6ea21573bab0fb77b0e1ef0fce454" + sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" url: "https://pub.dev" source: hosted - version: "5.7.2" + version: "5.8.0" window_manager: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 7bdb63f..e0e49b8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: url_launcher: ^6.3.0 package_info_plus: ^8.0.0 permission_handler: ^11.3.1 - flutter_inappwebview: ^6.1.4 + flutter_inappwebview: ^6.2.0-beta.1 draggable_menu: ^4.4.1 isar: 3.1.0+1 isar_flutter_libs: 3.1.0+1 @@ -52,10 +52,6 @@ dependencies: ffigen: ^12.0.0 http_interceptor: ^2.0.0 js_packer: ^0.0.5 - flutter_windows_webview: - git: - url: https://github.com/wgh136/flutter_windows_webview - ref: master flutter_qjs: git: url: https://github.com/kodjodevf/flutter_qjs.git @@ -97,6 +93,37 @@ dependency_overrides: meta: ^1.15.0 collection: ^1.19.0 + flutter_inappwebview_windows: + git: + url: https://github.com/kodjodevf/flutter_inappwebview.git + path: flutter_inappwebview_windows + ref: fix_windows_get_cookies + flutter_inappwebview_android: + git: + url: https://github.com/pichillilorenzo/flutter_inappwebview.git + path: flutter_inappwebview_android + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + flutter_inappwebview_ios: + git: + url: https://github.com/pichillilorenzo/flutter_inappwebview.git + path: flutter_inappwebview_ios + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + flutter_inappwebview_macos: + git: + url: https://github.com/pichillilorenzo/flutter_inappwebview.git + path: flutter_inappwebview_macos + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + flutter_inappwebview_platform_interface: + git: + url: https://github.com/pichillilorenzo/flutter_inappwebview.git + path: flutter_inappwebview_platform_interface + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + flutter_inappwebview: + git: + url: https://github.com/pichillilorenzo/flutter_inappwebview.git + path: flutter_inappwebview + ref: abf95722cb8d6df66c07e4feebac9e6154706d4f + dev_dependencies: flutter_test: sdk: flutter diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 111a6f3..59330a9 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -25,8 +24,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi")); FlutterQjsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterQjsPlugin")); - FlutterWindowsWebviewPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterWindowsWebviewPluginCApi")); IsarFlutterLibsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin")); MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 6198ed4..88481ea 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -5,7 +5,6 @@ list(APPEND FLUTTER_PLUGIN_LIST flutter_inappwebview_windows flutter_qjs - flutter_windows_webview isar_flutter_libs media_kit_libs_windows_video media_kit_video