From d177900394d095f3f5b786db0dbaf52ae7e7581f Mon Sep 17 00:00:00 2001 From: kodjomoustapha <107993382+kodjodevf@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:56:39 +0100 Subject: [PATCH] fix get cookie, fix filter --- lib/modules/manga/home/manga_home_screen.dart | 472 +++++++++--------- lib/modules/webview/webview.dart | 33 +- lib/services/http/m_client.dart | 2 +- lib/src/rust/api/image.dart | 2 +- lib/src/rust/frb_generated.dart | 4 +- lib/src/rust/frb_generated.io.dart | 2 +- lib/src/rust/frb_generated.web.dart | 2 +- pubspec.lock | 76 +-- pubspec.yaml | 4 +- rust/Cargo.lock | 8 +- rust/Cargo.toml | 2 +- rust/src/frb_generated.rs | 8 +- rust_builder/cargokit/build_tool/pubspec.lock | 34 +- 13 files changed, 330 insertions(+), 319 deletions(-) diff --git a/lib/modules/manga/home/manga_home_screen.dart b/lib/modules/manga/home/manga_home_screen.dart index 4ca46fad..c8484335 100644 --- a/lib/modules/manga/home/manga_home_screen.dart +++ b/lib/modules/manga/home/manga_home_screen.dart @@ -415,250 +415,256 @@ class _MangaHomeScreenState extends ConsumerState { ), ), ), - body: _getManga!.when( - data: (data) { - if (_hasNextPage) { - if (!data!.hasNextPage) { - if (mounted) { - setState(() { - _hasNextPage = false; - }); - } - } - } - if (_mangaList.isEmpty && data!.list.isNotEmpty) { - _mangaList.addAll(data.list); - } - if (_getManga!.isLoading) { - return const ProgressCenter(); - } - Widget buildProgressIndicator() { - return !(data!.list.isNotEmpty && - (data.hasNextPage || _hasNextPage)) - ? Container() - : _isLoading - ? const Center( - child: SizedBox( - height: 100, - width: 200, - child: Center( - child: CircularProgressIndicator(), - ), - ), - ) - : Padding( - padding: const EdgeInsets.all(4), - child: ElevatedButton( - style: ElevatedButton.styleFrom( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5))), - onPressed: () { - if (!_getManga!.isLoading) { - if (mounted) { - setState(() { - _isLoading = true; - }); - } - _loadMore().then((value) { - if (mounted && value != null) { - setState(() { - _mangaList.addAll(value.list); - _isLoading = false; - }); - } - }); - } - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - l10n.load_more, - style: const TextStyle( - overflow: TextOverflow.ellipsis), - maxLines: 2, - ), - const Icon(Icons.arrow_forward_outlined), - ], - )), - ); - } - - if (data!.list.isEmpty) { - return Center(child: Text(l10n.no_result)); - } - _scrollController.addListener(() { - if (_scrollController.position.pixels == - _scrollController.position.maxScrollExtent) { - if (_mangaList.isNotEmpty && - (_hasNextPage) && - !_isLoading && - !_getManga!.isLoading) { - if (mounted) { - setState(() { - _isLoading = true; - }); + body: _getManga!.isLoading + ? const ProgressCenter() + : _getManga!.when( + data: (data) { + if (_hasNextPage) { + if (!data!.hasNextPage) { + if (mounted) { + setState(() { + _hasNextPage = false; + }); + } + } } - _loadMore().then((value) { - if (mounted && value != null) { - setState(() { - _mangaList.addAll(value.list); - _isLoading = false; - }); + if (_mangaList.isEmpty && data!.list.isNotEmpty) { + _mangaList.addAll(data.list); + } + Widget buildProgressIndicator() { + return !(data!.list.isNotEmpty && + (data.hasNextPage || _hasNextPage)) + ? Container() + : _isLoading + ? const Center( + child: SizedBox( + height: 100, + width: 200, + child: Center( + child: CircularProgressIndicator(), + ), + ), + ) + : Padding( + padding: const EdgeInsets.all(4), + child: ElevatedButton( + style: ElevatedButton.styleFrom( + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(5))), + onPressed: () { + if (!_getManga!.isLoading) { + if (mounted) { + setState(() { + _isLoading = true; + }); + } + _loadMore().then((value) { + if (mounted && value != null) { + setState(() { + _mangaList.addAll(value.list); + _isLoading = false; + }); + } + }); + } + }, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Text( + l10n.load_more, + style: const TextStyle( + overflow: TextOverflow.ellipsis), + maxLines: 2, + ), + const Icon( + Icons.arrow_forward_outlined), + ], + )), + ); + } + + if (data!.list.isEmpty) { + return Center(child: Text(l10n.no_result)); + } + _scrollController.addListener(() { + if (_scrollController.position.pixels == + _scrollController.position.maxScrollExtent) { + if (_mangaList.isNotEmpty && + (_hasNextPage) && + !_isLoading && + !_getManga!.isLoading) { + if (mounted) { + setState(() { + _isLoading = true; + }); + } + _loadMore().then((value) { + if (mounted && value != null) { + setState(() { + _mangaList.addAll(value.list); + _isLoading = false; + }); + } + }); + } } }); - } - } - }); - _length = source.isFullData! ? _fullDataLength : _mangaList.length; - _length = - (_mangaList.length < _length ? _mangaList.length : _length); - final isComfortableGrid = - displayType == DisplayType.comfortableGrid; - return Padding( - padding: const EdgeInsets.only(top: 10), - child: Column( - children: [ - Flexible( - child: displayType == DisplayType.list - ? ListViewWidget( - controller: _scrollController, - itemCount: _length + 1, - itemBuilder: (context, index) { - if (index == _length) { - return buildProgressIndicator(); - } - return MangaHomeImageCardListTile( - isManga: source.isManga ?? true, - manga: _mangaList[index], - source: source); - }) - : Consumer(builder: (context, ref, child) { - final gridSize = ref.watch( - libraryGridSizeStateProvider( - isManga: source.isManga!)); + _length = + source.isFullData! ? _fullDataLength : _mangaList.length; + _length = (_mangaList.length < _length + ? _mangaList.length + : _length); + final isComfortableGrid = + displayType == DisplayType.comfortableGrid; + return Padding( + padding: const EdgeInsets.only(top: 10), + child: Column( + children: [ + Flexible( + child: displayType == DisplayType.list + ? ListViewWidget( + controller: _scrollController, + itemCount: _length + 1, + itemBuilder: (context, index) { + if (index == _length) { + return buildProgressIndicator(); + } + return MangaHomeImageCardListTile( + isManga: source.isManga ?? true, + manga: _mangaList[index], + source: source); + }) + : Consumer(builder: (context, ref, child) { + final gridSize = ref.watch( + libraryGridSizeStateProvider( + isManga: source.isManga!)); - return GridViewWidget( - gridSize: gridSize, - controller: _scrollController, - itemCount: _length + 1, - childAspectRatio: - isComfortableGrid ? 0.642 : 0.69, - itemBuilder: (context, index) { - if (index == _length) { - return buildProgressIndicator(); - } - return MangaHomeImageCard( - isManga: source.isManga ?? true, - manga: _mangaList[index], - source: source, - isComfortableGrid: isComfortableGrid, - ); - }, - ); - })), - ], - ), - ); - }, - error: (error, stackTrace) => Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.all(15), - child: Row( + return GridViewWidget( + gridSize: gridSize, + controller: _scrollController, + itemCount: _length + 1, + childAspectRatio: + isComfortableGrid ? 0.642 : 0.69, + itemBuilder: (context, index) { + if (index == _length) { + return buildProgressIndicator(); + } + return MangaHomeImageCard( + isManga: source.isManga ?? true, + manga: _mangaList[index], + source: source, + isComfortableGrid: isComfortableGrid, + ); + }, + ); + })), + ], + ), + ); + }, + error: (error, stackTrace) => Column( mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Column( - children: [ - IconButton( - onPressed: () { - if (_selectedIndex == 2 && - (_isSearch && _query.isNotEmpty) || - _isFiltering) { - ref.invalidate(searchProvider( - source: source, - query: _query, - page: 1, - filterList: filters)); - } else if (_selectedIndex == 1 && - !_isSearch && - _query.isEmpty) { - ref.invalidate(getLatestUpdatesProvider( - source: source, page: 1)); - } else if (_selectedIndex == 0 && - !_isSearch && - _query.isEmpty) { - ref.invalidate(getPopularProvider( - source: source, - page: 1, - )); - } - }, - icon: const Icon(Icons.refresh)), - Text(l10n.refresh) - ], - ), - const SizedBox( - width: 20, - ), - Column( - children: [ - IconButton( - onPressed: () async { - final baseUrl = ref - .watch(sourceBaseUrlProvider(source: source)); - Map data = { - 'url': baseUrl, - 'sourceId': source.id.toString(), - 'title': '', - "hasCloudFlare": source.hasCloudflare ?? false - }; - if (Platform.isLinux) { - final url = Uri.parse(baseUrl); - if (!await launchUrl( - url, - mode: LaunchMode.inAppBrowserView, - )) { - if (!await launchUrl( - url, - mode: LaunchMode.externalApplication, - )) { - throw 'Could not launch $url'; - } - } - } else { - context.push("/mangawebview", extra: data); - } - }, - icon: Icon( - Icons.public, - size: 22, - color: context.secondaryColor, + Padding( + padding: const EdgeInsets.all(15), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Column( + children: [ + IconButton( + onPressed: () { + if (_selectedIndex == 2 && + (_isSearch && _query.isNotEmpty) || + _isFiltering) { + ref.invalidate(searchProvider( + source: source, + query: _query, + page: 1, + filterList: filters)); + } else if (_selectedIndex == 1 && + !_isSearch && + _query.isEmpty) { + ref.invalidate(getLatestUpdatesProvider( + source: source, page: 1)); + } else if (_selectedIndex == 0 && + !_isSearch && + _query.isEmpty) { + ref.invalidate(getPopularProvider( + source: source, + page: 1, + )); + } + }, + icon: const Icon(Icons.refresh)), + Text(l10n.refresh) + ], ), - ), - const Text("Webview") - ], - ) + const SizedBox( + width: 20, + ), + Column( + children: [ + IconButton( + onPressed: () async { + final baseUrl = ref.watch( + sourceBaseUrlProvider(source: source)); + Map data = { + 'url': baseUrl, + 'sourceId': source.id.toString(), + 'title': '', + "hasCloudFlare": + source.hasCloudflare ?? false + }; + if (Platform.isLinux) { + final url = Uri.parse(baseUrl); + if (!await launchUrl( + url, + mode: LaunchMode.inAppBrowserView, + )) { + if (!await launchUrl( + url, + mode: LaunchMode.externalApplication, + )) { + throw 'Could not launch $url'; + } + } + } else { + context.push("/mangawebview", extra: data); + } + }, + icon: Icon( + Icons.public, + size: 22, + color: context.secondaryColor, + ), + ), + const Text("Webview") + ], + ) + ], + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + error.toString(), + textAlign: TextAlign.center, + ), + ), ], ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Text( - error.toString(), - textAlign: TextAlign.center, + loading: () => const Center( + child: CircularProgressIndicator(), ), - ), - ], - ), - loading: () => const Center( - child: CircularProgressIndicator(), - ), - )); + )); } } diff --git a/lib/modules/webview/webview.dart b/lib/modules/webview/webview.dart index 33fef2d8..0b4fb9b9 100644 --- a/lib/modules/webview/webview.dart +++ b/lib/modules/webview/webview.dart @@ -1,4 +1,5 @@ // ignore_for_file: depend_on_referenced_packages +import 'dart:async'; import 'dart:io'; import 'package:desktop_webview_window/desktop_webview_window.dart'; import 'package:flutter/material.dart'; @@ -50,9 +51,19 @@ class _MangaWebViewState extends ConsumerState { _desktopWebview = await WebviewWindow.create( configuration: CreateConfiguration( userDataFolderWindows: await getWebViewPath(), + titleBarTopPadding: Platform.isMacOS ? 20 : 0, ), ); - + final timer = Timer.periodic(const Duration(seconds: 1), (timer) async { + try { + final cookieList = await _desktopWebview!.getCookies(widget.url); + for (var c in cookieList) { + final cookie = + c.entries.map((e) => "${e.key}=${e.value}").join(";"); + await MClient.setCookie(_url, "", cookie: cookie); + } + } catch (_) {} + }); _desktopWebview! ..launch(widget.url) ..addOnWebMessageReceivedCallback((s) { @@ -63,14 +74,7 @@ class _MangaWebViewState extends ConsumerState { ..addScriptToExecuteOnDocumentCreated( "window.chrome.webview.postMessage(\"UA\" + navigator.userAgent)") ..onClose.whenComplete(() async { - if (Platform.isMacOS) { - final cookieList = await _desktopWebview!.getCookies(widget.url); - for (var c in cookieList) { - final cookie = - c.entries.map((e) => "${e.key}=${e.value}").join(";"); - await MClient.setCookie(_url, "", cookie: cookie); - } - } + timer.cancel(); if (mounted) { Navigator.pop(context); } @@ -125,7 +129,7 @@ class _MangaWebViewState extends ConsumerState { ), ) : Material( - child: SafeArea( + child: SafeArea( child: WillPopScope( onWillPop: () async { _webViewController?.goBack(); @@ -225,7 +229,7 @@ class _MangaWebViewState extends ConsumerState { shouldOverrideUrlLoading: (controller, navigationAction) async { var uri = navigationAction.request.url!; - + if (![ "http", "https", @@ -244,7 +248,7 @@ class _MangaWebViewState extends ConsumerState { return NavigationActionPolicy.CANCEL; } } - + return NavigationActionPolicy.ALLOW; }, onLoadStop: (controller, url) async { @@ -279,14 +283,15 @@ class _MangaWebViewState extends ConsumerState { }); } }, - initialUrlRequest: URLRequest(url: Uri.parse(widget.url)), + initialUrlRequest: + URLRequest(url: Uri.parse(widget.url)), ), ), ], ), ), ), - ); + ); } } diff --git a/lib/services/http/m_client.dart b/lib/services/http/m_client.dart index e9db47ad..8d540dc1 100644 --- a/lib/services/http/m_client.dart +++ b/lib/services/http/m_client.dart @@ -63,7 +63,7 @@ class MClient { static Future setCookie(String url, String ua, {String? cookie}) async { List cookies = []; - if (Platform.isWindows || Platform.isLinux) { + if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) { cookies = cookie ?.split(RegExp('(?<=)(,)(?=[^;]+?=)')) .where((cookie) => cookie.isNotEmpty) diff --git a/lib/src/rust/api/image.dart b/lib/src/rust/api/image.dart index b09e5391..0b40b435 100644 --- a/lib/src/rust/api/image.dart +++ b/lib/src/rust/api/image.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.1.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/src/rust/frb_generated.dart b/lib/src/rust/frb_generated.dart index f0a6be9b..dc0e33b7 100644 --- a/lib/src/rust/frb_generated.dart +++ b/lib/src/rust/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.1.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -53,7 +53,7 @@ class RustLib extends BaseEntrypoint { kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.1.0'; + String get codegenVersion => '2.2.0'; @override int get rustContentHash => -287789500; diff --git a/lib/src/rust/frb_generated.io.dart b/lib/src/rust/frb_generated.io.dart index bb3a1e9d..95a81c9a 100644 --- a/lib/src/rust/frb_generated.io.dart +++ b/lib/src/rust/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.1.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field diff --git a/lib/src/rust/frb_generated.web.dart b/lib/src/rust/frb_generated.web.dart index f7cc5015..2da8bdf4 100644 --- a/lib/src/rust/frb_generated.web.dart +++ b/lib/src/rust/frb_generated.web.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.1.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field diff --git a/pubspec.lock b/pubspec.lock index ef534dfc..13eb24a8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,23 +5,23 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "5aaf60d96c4cd00fe7f21594b5ad6a1b699c80a27420f8a837f4d68473ef09e3" + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 url: "https://pub.dev" source: hosted - version: "68.0.0" + version: "72.0.0" _macros: dependency: transitive description: dart source: sdk - version: "0.1.0" + version: "0.3.2" analyzer: dependency: "direct overridden" description: name: analyzer - sha256: "21f1d3720fd1c70316399d5e2bccaebb415c434592d778cce8acb967b8578808" + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 url: "https://pub.dev" source: hosted - version: "6.5.0" + version: "6.7.0" analyzer_plugin: dependency: transitive description: @@ -34,10 +34,10 @@ packages: dependency: transitive description: name: antlr4 - sha256: "96f576fcb88202a327b28f40485d99ca6987246ff37805488be06bcf05dc227f" + sha256: "752b4a6e4ad97953652a2b2bbf5377f46c94b579d3372b50080c7e5858234a05" url: "https://pub.dev" source: hosted - version: "4.13.1" + version: "4.13.2" archive: dependency: "direct main" description: @@ -138,18 +138,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + sha256: dd09dd4e2b078992f42aac7f1a622f01882a8492fef08486b27ddde929c19f04 url: "https://pub.dev" source: hosted - version: "2.4.11" + version: "2.4.12" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 url: "https://pub.dev" source: hosted - version: "7.3.1" + version: "7.3.2" built_collection: dependency: transitive description: @@ -435,10 +435,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: "824f5b9f389bfc4dddac3dea76cd70c51092d9dff0b2ece7ef4f53db8547d258" + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" url: "https://pub.dev" source: hosted - version: "8.0.6" + version: "8.0.7" fixnum: dependency: transitive description: @@ -542,10 +542,10 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: fac14d2dd67eeba29a20e5d99fac0d4d9fcd552cdf6bf4f8945f7679c6b07b1d + sha256: "7beb9cb4690916a6c4fd151d91dba53555ea258dbc029dd5f1bfba2e7bd32b86" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.0" flutter_test: dependency: "direct dev" description: flutter @@ -617,10 +617,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: d380de0355788c5c784fe9f81b43fc833b903991c25ecc4e2a416a67faefa722 + sha256: ddc16d34b0d74cb313986918c0f0885a7ba2fc24d8fb8419de75f0015144ccfe url: "https://pub.dev" source: hosted - version: "14.2.2" + version: "14.2.3" google_fonts: dependency: "direct main" description: @@ -817,10 +817,10 @@ packages: dependency: "direct main" description: name: json_path - sha256: "0e2a47581a9c95b3eedcd7f2ad1b8d7e93c5dee98e194b8ceef7b398405b7ff4" + sha256: "7a06bbb1cfad390b20fb7a2ca5e67d9ba59633879c6d71142b80fbf61c3b66f6" url: "https://pub.dev" source: hosted - version: "0.7.3" + version: "0.7.4" json_view: dependency: "direct main" description: @@ -841,18 +841,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -889,10 +889,10 @@ packages: dependency: transitive description: name: macros - sha256: "12e8a9842b5a7390de7a781ec63d793527582398d16ea26c60fed58833c9ae79" + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" url: "https://pub.dev" source: hosted - version: "0.1.0-main.0" + version: "0.1.2-main.4" matcher: dependency: transitive description: @@ -905,10 +905,10 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" maybe_just_nothing: dependency: transitive description: @@ -1116,10 +1116,10 @@ packages: dependency: transitive description: name: permission_handler_android - sha256: b29a799ca03be9f999aa6c39f7de5209482d638e6f857f6b93b0875c618b7e54 + sha256: eaf2a1ec4472775451e88ca6a7b86559ef2f1d1ed903942ed135e38ea0097dca url: "https://pub.dev" source: hosted - version: "12.0.7" + version: "12.0.8" permission_handler_apple: dependency: transitive description: @@ -1140,10 +1140,10 @@ packages: dependency: transitive description: name: permission_handler_platform_interface - sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" + sha256: fe0ffe274d665be8e34f9c59705441a7d248edebbe5d9e3ec2665f88b79358ea url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "4.2.2" permission_handler_windows: dependency: transitive description: @@ -1496,10 +1496,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" time: dependency: transitive description: @@ -1600,10 +1600,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: a36e2d7981122fa185006b216eb6b5b97ede3f9a54b7a511bc966971ab98d049 + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.3" url_launcher_windows: dependency: transitive description: @@ -1632,10 +1632,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" volume_controller: dependency: transitive description: @@ -1773,5 +1773,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=3.4.4 <4.0.0" + dart: ">=3.5.0 <4.0.0" flutter: ">=3.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index 7d8a2f30..cd7ec13a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: "none" version: 0.2.9+65 environment: - sdk: ">=3.4.4 <4.0.0" + sdk: ">=3.5.0 <4.0.0" dependencies: flutter: @@ -72,7 +72,7 @@ dependencies: highlight: ^0.7.0 json_view: ^0.4.2 super_sliver_list: ^0.4.1 - flutter_rust_bridge: ^2.1.0 + flutter_rust_bridge: ^2.2.0 rust_lib_mangayomi: path: rust_builder pseudom: ^1.0.1 diff --git a/rust/Cargo.lock b/rust/Cargo.lock index fa4e81a9..747edeb5 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -403,9 +403,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aebee2d1d5b8b3cfbbb11919b44791b4e0f037328195efd3832c7f7e0c6c6c8b" +checksum = "5db18c05aac3922abfe24282af9128947d2b27856f3d6a4f30888bffa976855a" dependencies = [ "allo-isolate", "android_logger", @@ -430,9 +430,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c061770f5f09e99d6143612e95cfc1ba2ae773746fbe5826a9c914a533b0723" +checksum = "f83de8013ddf893c420794e8a722f941eeca7f4939b46434282d66b676a0997c" dependencies = [ "hex", "md-5", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 87c40985..ec963deb 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" crate-type = ["cdylib", "staticlib"] [dependencies] -flutter_rust_bridge = "=2.1.0" +flutter_rust_bridge = "=2.2.0" image = "0.25.0" diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 8af28c84..06fa1cf9 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.1.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. #![allow( non_camel_case_types, @@ -36,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_opaque = RustOpaqueMoi, default_rust_auto_opaque = RustAutoOpaqueMoi, ); -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.1.0"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.2.0"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -287789500; // Section: executor @@ -184,7 +184,7 @@ impl SseEncode for bool { #[cfg(not(target_family = "wasm"))] mod io { // This file is automatically generated, so please do not edit it. - // Generated by `flutter_rust_bridge`@ 2.1.0. + // Generated by `flutter_rust_bridge`@ 2.2.0. // Section: imports @@ -206,7 +206,7 @@ pub use io::*; #[cfg(target_family = "wasm")] mod web { // This file is automatically generated, so please do not edit it. - // Generated by `flutter_rust_bridge`@ 2.1.0. + // Generated by `flutter_rust_bridge`@ 2.2.0. // Section: imports diff --git a/rust_builder/cargokit/build_tool/pubspec.lock b/rust_builder/cargokit/build_tool/pubspec.lock index 092c5601..01166b2f 100644 --- a/rust_builder/cargokit/build_tool/pubspec.lock +++ b/rust_builder/cargokit/build_tool/pubspec.lock @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: coverage - sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + sha256: "576aaab8b1abdd452e0f656c3e73da9ead9d7880e15bdc494189d9c1a1baf0db" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" crypto: dependency: "direct main" description: @@ -349,10 +349,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -365,26 +365,26 @@ packages: dependency: "direct dev" description: name: test - sha256: "7ee44229615f8f642b68120165ae4c2a75fe77ae2065b1e55ae4711f6cf0899e" + sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f" url: "https://pub.dev" source: hosted - version: "1.25.7" + version: "1.25.8" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" test_core: dependency: transitive description: name: test_core - sha256: "55ea5a652e38a1dfb32943a7973f3681a60f872f8c3a05a14664ad54ef9c6696" + sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d" url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" toml: dependency: "direct main" description: @@ -429,26 +429,26 @@ packages: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.0.0" web_socket: dependency: transitive description: name: web_socket - sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.1" webkit_inspection_protocol: dependency: transitive description: @@ -466,4 +466,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.4.0 <4.0.0"