From b18024a8ce2f1c6d826c420fb3c8c1c2c6f9886f Mon Sep 17 00:00:00 2001 From: xkeyC <3334969096@qq.com> Date: Sun, 16 Mar 2025 15:51:53 +0800 Subject: [PATCH] bump: frb --- lib/common/rust/api/asar_api.dart | 2 +- lib/common/rust/api/http_api.dart | 2 +- lib/common/rust/api/rs_process.dart | 2 +- lib/common/rust/api/win32_api.dart | 2 +- lib/common/rust/frb_generated.dart | 32 +++++++++++++-------------- lib/common/rust/frb_generated.io.dart | 24 ++++++++++---------- lib/common/rust/http_package.dart | 2 +- lib/main.dart | 9 +++----- pubspec.yaml | 2 +- rust/Cargo.toml | 4 ++-- rust/src/frb_generated.rs | 6 ++--- 11 files changed, 42 insertions(+), 45 deletions(-) diff --git a/lib/common/rust/api/asar_api.dart b/lib/common/rust/api/asar_api.dart index f46986d..8cab526 100644 --- a/lib/common/rust/api/asar_api.dart +++ b/lib/common/rust/api/asar_api.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.8.0. +// @generated by `flutter_rust_bridge`@ 2.9.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/common/rust/api/http_api.dart b/lib/common/rust/api/http_api.dart index 09cfcdd..94d296c 100644 --- a/lib/common/rust/api/http_api.dart +++ b/lib/common/rust/api/http_api.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.8.0. +// @generated by `flutter_rust_bridge`@ 2.9.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/common/rust/api/rs_process.dart b/lib/common/rust/api/rs_process.dart index a303733..5a0f11a 100644 --- a/lib/common/rust/api/rs_process.dart +++ b/lib/common/rust/api/rs_process.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.8.0. +// @generated by `flutter_rust_bridge`@ 2.9.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/common/rust/api/win32_api.dart b/lib/common/rust/api/win32_api.dart index b2aaadb..756f818 100644 --- a/lib/common/rust/api/win32_api.dart +++ b/lib/common/rust/api/win32_api.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.8.0. +// @generated by `flutter_rust_bridge`@ 2.9.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/common/rust/frb_generated.dart b/lib/common/rust/frb_generated.dart index dab23fb..c1cb47b 100644 --- a/lib/common/rust/frb_generated.dart +++ b/lib/common/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.8.0. +// @generated by `flutter_rust_bridge`@ 2.9.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 @@ -67,7 +67,7 @@ class RustLib extends BaseEntrypoint { kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.8.0'; + String get codegenVersion => '2.9.0'; @override int get rustContentHash => 1832496273; @@ -183,7 +183,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { var arg0 = cst_encode_my_method(method); var arg1 = cst_encode_String(url); - var arg2 = cst_encode_opt_Map_String_String(headers); + var arg2 = cst_encode_opt_Map_String_String_None(headers); var arg3 = cst_encode_opt_list_prim_u_8_strict(inputData); var arg4 = cst_encode_opt_String(withIpAddress); var arg5 = cst_encode_opt_box_autoadd_bool(withCustomDns); @@ -303,7 +303,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { {required Map headers}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_Map_String_String(headers); + var arg0 = cst_encode_Map_String_String_None(headers); return wire.wire__crate__api__http_api__set_default_header(port_, arg0); }, codec: DcoCodec( @@ -409,7 +409,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - Map dco_decode_Map_String_String(dynamic raw) { + Map dco_decode_Map_String_String_None(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return Map.fromEntries(dco_decode_list_record_string_string(raw) .map((e) => MapEntry(e.$1, e.$2))); @@ -496,9 +496,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - Map? dco_decode_opt_Map_String_String(dynamic raw) { + Map? dco_decode_opt_Map_String_String_None(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_Map_String_String(raw); + return raw == null ? null : dco_decode_Map_String_String_None(raw); } @protected @@ -578,7 +578,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); return RustHttpResponse( statusCode: dco_decode_u_16(arr[0]), - headers: dco_decode_Map_String_String(arr[1]), + headers: dco_decode_Map_String_String_None(arr[1]), url: dco_decode_String(arr[2]), contentLength: dco_decode_opt_box_autoadd_u_64(arr[3]), version: dco_decode_my_http_version(arr[4]), @@ -625,7 +625,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - Map sse_decode_Map_String_String( + Map sse_decode_Map_String_String_None( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var inner = sse_decode_list_record_string_string(deserializer); @@ -732,12 +732,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - Map? sse_decode_opt_Map_String_String( + Map? sse_decode_opt_Map_String_String_None( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs if (sse_decode_bool(deserializer)) { - return (sse_decode_Map_String_String(deserializer)); + return (sse_decode_Map_String_String_None(deserializer)); } else { return null; } @@ -832,7 +832,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { RustHttpResponse sse_decode_rust_http_response(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var var_statusCode = sse_decode_u_16(deserializer); - var var_headers = sse_decode_Map_String_String(deserializer); + var var_headers = sse_decode_Map_String_String_None(deserializer); var var_url = sse_decode_String(deserializer); var var_contentLength = sse_decode_opt_box_autoadd_u_64(deserializer); var var_version = sse_decode_my_http_version(deserializer); @@ -939,7 +939,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - void sse_encode_Map_String_String( + void sse_encode_Map_String_String_None( Map self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_list_record_string_string( @@ -1046,13 +1046,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - void sse_encode_opt_Map_String_String( + void sse_encode_opt_Map_String_String_None( Map? self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bool(self != null, serializer); if (self != null) { - sse_encode_Map_String_String(self, serializer); + sse_encode_Map_String_String_None(self, serializer); } } @@ -1135,7 +1135,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { RustHttpResponse self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_u_16(self.statusCode, serializer); - sse_encode_Map_String_String(self.headers, serializer); + sse_encode_Map_String_String_None(self.headers, serializer); sse_encode_String(self.url, serializer); sse_encode_opt_box_autoadd_u_64(self.contentLength, serializer); sse_encode_my_http_version(self.version, serializer); diff --git a/lib/common/rust/frb_generated.io.dart b/lib/common/rust/frb_generated.io.dart index b2d5710..34d748e 100644 --- a/lib/common/rust/frb_generated.io.dart +++ b/lib/common/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.8.0. +// @generated by `flutter_rust_bridge`@ 2.9.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 @@ -26,7 +26,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { AnyhowException dco_decode_AnyhowException(dynamic raw); @protected - Map dco_decode_Map_String_String(dynamic raw); + Map dco_decode_Map_String_String_None(dynamic raw); @protected RustStreamSink @@ -70,7 +70,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { MyMethod dco_decode_my_method(dynamic raw); @protected - Map? dco_decode_opt_Map_String_String(dynamic raw); + Map? dco_decode_opt_Map_String_String_None(dynamic raw); @protected String? dco_decode_opt_String(dynamic raw); @@ -118,7 +118,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer); @protected - Map sse_decode_Map_String_String( + Map sse_decode_Map_String_String_None( SseDeserializer deserializer); @protected @@ -165,7 +165,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { MyMethod sse_decode_my_method(SseDeserializer deserializer); @protected - Map? sse_decode_opt_Map_String_String( + Map? sse_decode_opt_Map_String_String_None( SseDeserializer deserializer); @protected @@ -222,8 +222,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_Map_String_String( - Map raw) { + ffi.Pointer + cst_encode_Map_String_String_None(Map raw) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_list_record_string_string( raw.entries.map((e) => (e.key, e.value)).toList()); @@ -309,9 +309,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ffi.Pointer - cst_encode_opt_Map_String_String(Map? raw) { + cst_encode_opt_Map_String_String_None(Map? raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_Map_String_String(raw); + return raw == null ? ffi.nullptr : cst_encode_Map_String_String_None(raw); } @protected @@ -381,7 +381,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void cst_api_fill_to_wire_rust_http_response( RustHttpResponse apiObj, wire_cst_rust_http_response wireObj) { wireObj.status_code = cst_encode_u_16(apiObj.statusCode); - wireObj.headers = cst_encode_Map_String_String(apiObj.headers); + wireObj.headers = cst_encode_Map_String_String_None(apiObj.headers); wireObj.url = cst_encode_String(apiObj.url); wireObj.content_length = cst_encode_opt_box_autoadd_u_64(apiObj.contentLength); @@ -422,7 +422,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { AnyhowException self, SseSerializer serializer); @protected - void sse_encode_Map_String_String( + void sse_encode_Map_String_String_None( Map self, SseSerializer serializer); @protected @@ -469,7 +469,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_my_method(MyMethod self, SseSerializer serializer); @protected - void sse_encode_opt_Map_String_String( + void sse_encode_opt_Map_String_String_None( Map? self, SseSerializer serializer); @protected diff --git a/lib/common/rust/http_package.dart b/lib/common/rust/http_package.dart index ac2d226..5f050ec 100644 --- a/lib/common/rust/http_package.dart +++ b/lib/common/rust/http_package.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.8.0. +// @generated by `flutter_rust_bridge`@ 2.9.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/main.dart b/lib/main.dart index f2cb9c1..b3ffea4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -11,8 +11,7 @@ import 'app.dart'; void main(List args) async { // webview window if (runWebViewTitleBarWidget(args, - backgroundColor: const Color.fromRGBO(19, 36, 49, 1), - builder: _defaultWebviewTitleBar)) { + backgroundColor: const Color.fromRGBO(19, 36, 49, 1), builder: _defaultWebviewTitleBar)) { return; } WidgetsFlutterBinding.ensureInitialized(); @@ -53,8 +52,7 @@ class App extends HookConsumerWidget { supportedLocales: S.delegate.supportedLocales, builder: (context, child) { return MediaQuery( - data: - MediaQuery.of(context).copyWith(textScaler: TextScaler.noScaling), + data: MediaQuery.of(context).copyWith(textScaler: TextScaler.noScaling), child: child ?? const SizedBox(), ); }, @@ -69,8 +67,7 @@ class App extends HookConsumerWidget { buttonTheme: ButtonThemeData( defaultButtonStyle: ButtonStyle( shape: WidgetStateProperty.all(RoundedRectangleBorder( - borderRadius: BorderRadius.circular(4), - side: BorderSide(color: Colors.white.withValues(alpha: .01)))), + borderRadius: BorderRadius.circular(4), side: BorderSide(color: Colors.white.withValues(alpha: .01)))), ))), locale: appState.appLocale, debugShowCheckedModeBanner: false, diff --git a/pubspec.yaml b/pubspec.yaml index 049dfe2..38866b8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -43,7 +43,7 @@ dependencies: flutter_tilt: ^3.0.0 card_swiper: ^3.0.1 ffi: ^2.1.0 - flutter_rust_bridge: ^2.7.0 + flutter_rust_bridge: 2.9.0 freezed_annotation: ^2.4.1 meta: ^1.9.1 hexcolor: ^3.0.1 diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 1fa5ca4..c22a2ab 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -11,7 +11,7 @@ strip = "debuginfo" crate-type = ["cdylib", "staticlib"] [dependencies] -flutter_rust_bridge = "=2.8.0" +flutter_rust_bridge = "=2.9.0" tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process"] } futures = { version = "0.3", default-features = false, features = ["executor"] } url = "2.5" @@ -29,4 +29,4 @@ windows = { version = "0.60.0", features = ["Win32_UI_WindowsAndMessaging"] } win32job = "2" [lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] } \ No newline at end of file +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] } diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 8e293c4..339ec9c 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.8.0. +// @generated by `flutter_rust_bridge`@ 2.9.0. #![allow( non_camel_case_types, @@ -36,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_opaque = RustOpaqueNom, default_rust_auto_opaque = RustAutoOpaqueNom, ); -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.8.0"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.9.0"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1832496273; // Section: executor @@ -1144,7 +1144,7 @@ impl SseEncode for () { #[cfg(not(target_family = "wasm"))] mod io { // This file is automatically generated, so please do not edit it. - // @generated by `flutter_rust_bridge`@ 2.8.0. + // @generated by `flutter_rust_bridge`@ 2.9.0. // Section: imports