From e961b6c2e0604e5617714f0a7aff655d1a21f2fe Mon Sep 17 00:00:00 2001 From: niuhuan Date: Thu, 5 Sep 2024 17:13:47 +0800 Subject: [PATCH] :bug: fix login --- .github/workflows/Package.yml | 5 +- .metadata | 30 +- android/.gitignore | 2 +- android/app/build.gradle | 53 +- android/app/src/main/AndroidManifest.xml | 3 +- android/build.gradle | 4 +- android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 9 +- ci/version.code.txt | 2 +- ci/version.info.txt | 3 + flutter_rust_bridge.yaml | 3 +- integration_test/simple_test.dart | 2 +- ios/Podfile.lock | 2 +- ios/Runner.xcodeproj/project.pbxproj | 122 +-- ios/Runner/AppDelegate.swift | 4 +- ios/Runner/Info.plist | 8 +- lib/bridge_generated.dart | 1 - lib/screens/comic_info_screen.dart | 8 +- lib/screens/comic_search_screen.dart | 3 +- lib/screens/components/comic_card.dart | 1 - lib/screens/components/comic_pager.dart | 12 +- lib/screens/components/commons.dart | 2 +- .../components/download_comic_card.dart | 1 - .../components/flutter_search_bar_base.dart | 207 +++++ lib/screens/discovery_screen.dart | 2 +- lib/screens/histories_screen.dart | 2 +- lib/src/rust/api/api.dart | 223 +++--- lib/src/rust/api/simple.dart | 10 + lib/src/rust/copy_client/dtos.dart | 32 +- lib/src/rust/frb_generated.dart | 700 ++++++++--------- lib/src/rust/frb_generated.io.dart | 29 +- lib/src/rust/frb_generated.web.dart | 40 +- lib/src/rust/udto.dart | 164 ++-- macos/Podfile.lock | 2 +- macos/Runner.xcodeproj/project.pbxproj | 135 ++-- macos/Runner/AppDelegate.swift | 2 +- macos/Runner/DebugProfile.entitlements | 2 + macos/Runner/Release.entitlements | 2 + macos/RunnerTests/RunnerTests.swift | 2 +- pubspec.lock | 112 ++- pubspec.yaml | 12 +- rust/Cargo.lock | 680 +++++++++-------- rust/Cargo.toml | 3 +- rust/src/api/mod.rs | 1 + rust/src/api/simple.rs | 10 + rust/src/copy_client/dtos.rs | 27 +- rust/src/frb_generated.io.rs | 13 - rust/src/frb_generated.rs | 710 +++++++++++++----- rust/src/frb_generated.web.rs | 15 - rust_builder/cargokit/gradle/plugin.gradle | 6 +- web/index.html | 23 +- windows/runner/runner.exe.manifest | 6 - windows/runner/utils.cpp | 4 +- 54 files changed, 1983 insertions(+), 1477 deletions(-) delete mode 100644 lib/bridge_generated.dart create mode 100644 lib/screens/components/flutter_search_bar_base.dart create mode 100644 lib/src/rust/api/simple.dart create mode 100644 rust/src/api/simple.rs delete mode 100644 rust/src/frb_generated.io.rs delete mode 100644 rust/src/frb_generated.web.rs diff --git a/.github/workflows/Package.yml b/.github/workflows/Package.yml index 3e661a2..fcdbeea 100644 --- a/.github/workflows/Package.yml +++ b/.github/workflows/Package.yml @@ -5,11 +5,10 @@ on: env: LLVM_VERSION: '10.0' - RUST_TOOLCHAIN: nightly-2024-04-15 + RUST_TOOLCHAIN: nightly-2024-09-04 NDK_VERSION: 25.2.9519653 - FLUTTER_VERSION: '3.19.3' + FLUTTER_VERSION: '3.24.2' FLUTTER_CHANNEL: 'stable' - FRB_VERSION: 'v2.0.0-dev.32' jobs: diff --git a/.metadata b/.metadata index aa90aa8..bf94537 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "ba393198430278b6595976de84fe170f553cc728" + revision: "4cf269e36de2573851eaef3c763994f8f9be494d" channel: "stable" project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: ba393198430278b6595976de84fe170f553cc728 - base_revision: ba393198430278b6595976de84fe170f553cc728 + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d - platform: android - create_revision: ba393198430278b6595976de84fe170f553cc728 - base_revision: ba393198430278b6595976de84fe170f553cc728 + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d - platform: ios - create_revision: ba393198430278b6595976de84fe170f553cc728 - base_revision: ba393198430278b6595976de84fe170f553cc728 + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d - platform: linux - create_revision: ba393198430278b6595976de84fe170f553cc728 - base_revision: ba393198430278b6595976de84fe170f553cc728 + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d - platform: macos - create_revision: ba393198430278b6595976de84fe170f553cc728 - base_revision: ba393198430278b6595976de84fe170f553cc728 + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d - platform: web - create_revision: ba393198430278b6595976de84fe170f553cc728 - base_revision: ba393198430278b6595976de84fe170f553cc728 + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d - platform: windows - create_revision: ba393198430278b6595976de84fe170f553cc728 - base_revision: ba393198430278b6595976de84fe170f553cc728 + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d # User provided section diff --git a/android/.gitignore b/android/.gitignore index 6f56801..55afd91 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle index d41cfb3..8697d51 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,67 +1,44 @@ plugins { id "com.android.application" id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - android { - namespace "opensource.kobi" - compileSdk flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "opensource.kobi" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + jvmTarget = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "opensource.kobi" + applicationId = "opensource.kobi" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' + source = "../.." } - -dependencies {} diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index a3e63ca..3e94ebb 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -22,6 +22,7 @@ android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" + android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" @@ -46,7 +47,7 @@ android:value="2" /> diff --git a/android/build.gradle b/android/build.gradle index bc157bd..d2ffbff 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,12 +5,12 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/android/gradle.properties b/android/gradle.properties index 598d13f..2597170 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index e1ca574..7bb2df6 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index 1d6d19b..b9e43bd 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -5,10 +5,9 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() @@ -19,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false - id "org.jetbrains.kotlin.android" version "1.7.10" apply false + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false } include ":app" diff --git a/ci/version.code.txt b/ci/version.code.txt index 3527dbc..f252462 100644 --- a/ci/version.code.txt +++ b/ci/version.code.txt @@ -1 +1 @@ -v0.0.11 +v0.0.12 diff --git a/ci/version.info.txt b/ci/version.info.txt index af0ec45..25fd375 100644 --- a/ci/version.info.txt +++ b/ci/version.info.txt @@ -1,6 +1,9 @@ ## 如果图片显示不出来需要删除原来的APP重新安装 ## PC端需要手动找到文件夹删除 +v0.0.12 +- [x] 尝试修复登录问题 + v0.0.11 v0.0.10 - [x] 尝试修复网络问题 diff --git a/flutter_rust_bridge.yaml b/flutter_rust_bridge.yaml index f009f9c..e15ed91 100644 --- a/flutter_rust_bridge.yaml +++ b/flutter_rust_bridge.yaml @@ -1,2 +1,3 @@ -rust_input: rust/src/api/**/*.rs +rust_input: crate::api +rust_root: rust/ dart_output: lib/src/rust \ No newline at end of file diff --git a/integration_test/simple_test.dart b/integration_test/simple_test.dart index c21e48a..e42fe4f 100644 --- a/integration_test/simple_test.dart +++ b/integration_test/simple_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:kobi/main.dart'; -import 'package:integration_test/integration_test.dart'; import 'package:kobi/src/rust/frb_generated.dart'; +import 'package:integration_test/integration_test.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/ios/Podfile.lock b/ios/Podfile.lock index de7f11a..029996f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -35,7 +35,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - integration_test: 13825b8a9334a850581300559b8839134b124670 + integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 rust_lib_kobi: 8e3996650aa1337cbf75bd75ff81442438eef008 uni_links: d97da20c7701486ba192624d99bffaaffcfc298a diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8622874..d990eea 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -9,13 +9,13 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 362074E57A29776817887F8F /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 404D4E8FE22ECF539170EEAA /* Pods_RunnerTests.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - A0F2B1B965D6879B93161311 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AA94CADE34D9CCA54FFDA51 /* Pods_RunnerTests.framework */; }; - B0EEC9F27753C4AEA46AECDA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17F8E4A0DE9C609FAB9A2B06 /* Pods_Runner.framework */; }; + B86E6748CA88BEB7B0FCC18A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 82FC47CDBD2C67C5DB7E98F5 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,18 +42,20 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 053F16B5705A968680B1B024 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 17F8E4A0DE9C609FAB9A2B06 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2AA94CADE34D9CCA54FFDA51 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 404D4E8FE22ECF539170EEAA /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5D7F27200BE1FAD978D2C8A6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 778F1628192D998391CCCD4F /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7DD794ED68F2FE60F4F9119A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 82FC47CDBD2C67C5DB7E98F5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 841E77FA36F6B5E0058DE61F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 882814754DA4F98C335A61E5 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -61,18 +63,16 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A3B76518869A3D13DEDCC83A /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - AC308E86CE7D95B44ABB5980 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - DADC4728E9C60CB270C6D06D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - EBDFAFD6403FC48D71F2214C /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + C9109C123A0AF9F5D2D7D5AD /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + FBCF86EADF92B7BBD33711F8 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 5249AC4FB98DA6D1EECBCF76 /* Frameworks */ = { + 448C155864C58B1F1C169E64 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A0F2B1B965D6879B93161311 /* Pods_RunnerTests.framework in Frameworks */, + 362074E57A29776817887F8F /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -80,7 +80,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B0EEC9F27753C4AEA46AECDA /* Pods_Runner.framework in Frameworks */, + B86E6748CA88BEB7B0FCC18A /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -95,6 +95,15 @@ path = RunnerTests; sourceTree = ""; }; + 5169E0B45AFE0F39DE9FE5CB /* Frameworks */ = { + isa = PBXGroup; + children = ( + 82FC47CDBD2C67C5DB7E98F5 /* Pods_Runner.framework */, + 404D4E8FE22ECF539170EEAA /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -113,8 +122,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, - EF5FA4BF4DE8E3825E44BED4 /* Pods */, - A6132C82B197D82A730B8304 /* Frameworks */, + C69EEEC55E31A11194BEE017 /* Pods */, + 5169E0B45AFE0F39DE9FE5CB /* Frameworks */, ); sourceTree = ""; }; @@ -142,24 +151,15 @@ path = Runner; sourceTree = ""; }; - A6132C82B197D82A730B8304 /* Frameworks */ = { + C69EEEC55E31A11194BEE017 /* Pods */ = { isa = PBXGroup; children = ( - 17F8E4A0DE9C609FAB9A2B06 /* Pods_Runner.framework */, - 2AA94CADE34D9CCA54FFDA51 /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - EF5FA4BF4DE8E3825E44BED4 /* Pods */ = { - isa = PBXGroup; - children = ( - 7DD794ED68F2FE60F4F9119A /* Pods-Runner.debug.xcconfig */, - AC308E86CE7D95B44ABB5980 /* Pods-Runner.release.xcconfig */, - DADC4728E9C60CB270C6D06D /* Pods-Runner.profile.xcconfig */, - 778F1628192D998391CCCD4F /* Pods-RunnerTests.debug.xcconfig */, - A3B76518869A3D13DEDCC83A /* Pods-RunnerTests.release.xcconfig */, - EBDFAFD6403FC48D71F2214C /* Pods-RunnerTests.profile.xcconfig */, + 053F16B5705A968680B1B024 /* Pods-Runner.debug.xcconfig */, + 841E77FA36F6B5E0058DE61F /* Pods-Runner.release.xcconfig */, + 5D7F27200BE1FAD978D2C8A6 /* Pods-Runner.profile.xcconfig */, + FBCF86EADF92B7BBD33711F8 /* Pods-RunnerTests.debug.xcconfig */, + C9109C123A0AF9F5D2D7D5AD /* Pods-RunnerTests.release.xcconfig */, + 882814754DA4F98C335A61E5 /* Pods-RunnerTests.profile.xcconfig */, ); name = Pods; path = Pods; @@ -172,10 +172,10 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - 6699DF4BD556EB96E3302718 /* [CP] Check Pods Manifest.lock */, + D5ACFC6376FCF3E2EAB80614 /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, - 5249AC4FB98DA6D1EECBCF76 /* Frameworks */, + 448C155864C58B1F1C169E64 /* Frameworks */, ); buildRules = ( ); @@ -191,14 +191,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 0EC50CF0D9B956DDA98E7DE1 /* [CP] Check Pods Manifest.lock */, + 023BA91DE269B8A404E714B5 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - BEEA3044CA484DFFCD896B21 /* [CP] Embed Pods Frameworks */, + C278CE3B6306D31DC868A736 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -270,7 +270,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0EC50CF0D9B956DDA98E7DE1 /* [CP] Check Pods Manifest.lock */ = { + 023BA91DE269B8A404E714B5 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -308,58 +308,58 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 6699DF4BD556EB96E3302718 /* [CP] Check Pods Manifest.lock */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( ); + name = "Run Script"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + C278CE3B6306D31DC868A736 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "Run Script"; - outputPaths = ( + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - BEEA3044CA484DFFCD896B21 /* [CP] Embed Pods Frameworks */ = { + D5ACFC6376FCF3E2EAB80614 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -487,7 +487,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 778F1628192D998391CCCD4F /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = FBCF86EADF92B7BBD33711F8 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -505,7 +505,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A3B76518869A3D13DEDCC83A /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = C9109C123A0AF9F5D2D7D5AD /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -521,7 +521,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EBDFAFD6403FC48D71F2214C /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 882814754DA4F98C335A61E5 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 4824b89..1f1c9b9 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ -import UIKit import Flutter +import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index af0bc5e..e145054 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -51,9 +51,9 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIViewControllerBasedStatusBarAppearance - - application-identifier - opensource.kobi + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + diff --git a/lib/bridge_generated.dart b/lib/bridge_generated.dart deleted file mode 100644 index 8b13789..0000000 --- a/lib/bridge_generated.dart +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/screens/comic_info_screen.dart b/lib/screens/comic_info_screen.dart index 9227fae..6a360ec 100644 --- a/lib/screens/comic_info_screen.dart +++ b/lib/screens/comic_info_screen.dart @@ -58,13 +58,13 @@ class _ComicInfoScreenState extends State with RouteAware { _loadViewLog(); } - static const _chapterLimit = 100; + static BigInt _chapterLimit = BigInt.parse("100"); Future fetch() async { final comic = await api.comic(pathWord: widget.comicInfo.pathWord); final Map> gcMap = {}; for (var group in comic.groups) { - var offset = 0; + BigInt offset = BigInt.parse("0"); List cList = []; while (true) { final response = await api.comicChapters( @@ -75,7 +75,7 @@ class _ComicInfoScreenState extends State with RouteAware { ); cList.addAll(response.list); offset += _chapterLimit; - if (response.total <= offset) { + if (response.total <= offset.toInt()) { break; } } @@ -438,7 +438,7 @@ class _ComicInfoScreenState extends State with RouteAware { elevation: 0, color: Colors.grey.shade500.withOpacity(.3), textColor: Theme.of(context).textTheme.bodyMedium?.color, - child: const Text("从orde头开始"), + child: const Text("从头开始"), onPressed: _startRead, ), ), diff --git a/lib/screens/comic_search_screen.dart b/lib/screens/comic_search_screen.dart index 513dea4..5f45e03 100644 --- a/lib/screens/comic_search_screen.dart +++ b/lib/screens/comic_search_screen.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:flutter_search_bar/flutter_search_bar.dart' as sb; +import 'components/flutter_search_bar_base.dart' as sb; import '../src/rust/api/api.dart' as api; -import '../src/rust/udto.dart'; import 'components/comic_card.dart'; import 'components/comic_pager.dart'; diff --git a/lib/screens/components/comic_card.dart b/lib/screens/components/comic_card.dart index 2f0955b..e9579dd 100644 --- a/lib/screens/components/comic_card.dart +++ b/lib/screens/components/comic_card.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import '../../src/rust/copy_client/dtos.dart'; import 'images.dart'; -import '../../bridge_generated.dart'; class CommonComicCard extends StatelessWidget { final CommonComicInfo comic; diff --git a/lib/screens/components/comic_pager.dart b/lib/screens/components/comic_pager.dart index d862cc8..7ca86ab 100644 --- a/lib/screens/components/comic_pager.dart +++ b/lib/screens/components/comic_pager.dart @@ -6,7 +6,7 @@ import 'comic_list.dart'; import 'commons.dart'; class ComicPager extends StatefulWidget { - final Future> Function(int offset, int limit) + final Future> Function(BigInt offset, BigInt limit) fetcher; const ComicPager({Key? key, required this.fetcher}) : super(key: key); @@ -22,7 +22,7 @@ class _ComicPagerState extends State { bool finish = false; bool error = false; int _offset = 0; - static const int _limit = 21; + static final BigInt _limit = BigInt.parse("21"); @override void dispose() { @@ -59,13 +59,13 @@ class _ComicPagerState extends State { error = false; }); final resp = await widget.fetcher( - 0, + BigInt.from(0), _limit, ); setState(() { _records.clear(); _records.addAll(resp.list); - _offset += _limit; + _offset = _offset + _limit.toInt(); finish = resp.total <= _offset; }); _refreshController.refreshCompleted(); @@ -93,12 +93,12 @@ class _ComicPagerState extends State { _onLoading() async { try { final resp = await widget.fetcher( - _offset, + BigInt.from(_offset), _limit, ); setState(() { _records.addAll(resp.list); - _offset += _limit; + _offset = _offset + _limit.toInt(); finish = resp.total <= _offset; }); _refreshController.loadComplete(); diff --git a/lib/screens/components/commons.dart b/lib/screens/components/commons.dart index 2d382eb..c7c9bd0 100644 --- a/lib/screens/components/commons.dart +++ b/lib/screens/components/commons.dart @@ -57,7 +57,7 @@ Future displayTextInputDialog(BuildContext context, fontSize: 12, color: Theme.of(context) .textTheme - .bodyText1 + .bodyMedium ?.color ?.withOpacity(.5)), ), diff --git a/lib/screens/components/download_comic_card.dart b/lib/screens/components/download_comic_card.dart index 4afc4c6..a3c96c8 100644 --- a/lib/screens/components/download_comic_card.dart +++ b/lib/screens/components/download_comic_card.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; -import '../../bridge_generated.dart'; import '../../commons.dart'; import '../../src/rust/udto.dart'; import 'images.dart'; diff --git a/lib/screens/components/flutter_search_bar_base.dart b/lib/screens/components/flutter_search_bar_base.dart new file mode 100644 index 0000000..2164ca3 --- /dev/null +++ b/lib/screens/components/flutter_search_bar_base.dart @@ -0,0 +1,207 @@ +// Copyright (c) 2017, Spencer. All rights reserved. Use of this source code +// is governed by a BSD-style license that can be found in the LICENSE file. + +import 'package:flutter/material.dart'; + +typedef Widget AppBarCallback(BuildContext context); +typedef void TextFieldSubmitCallback(String value); +typedef void TextFieldChangeCallback(String value); +typedef void SetStateCallback(void fn()); + +class SearchBar { + /// Whether the search should take place "in the existing search bar", meaning whether it has the same background or a flipped one. Defaults to true. + final bool inBar; + + /// Whether or not the search bar should close on submit. Defaults to true. + final bool closeOnSubmit; + + /// Whether the text field should be cleared when it is submitted + final bool clearOnSubmit; + + /// A callback which should return an AppBar that is displayed until search is started. One of the actions in this AppBar should be a search button which you obtain from SearchBar.getSearchAction(). This will be called every time search is ended, etc. (like a build method on a widget) + final AppBarCallback buildDefaultAppBar; + + /// A void callback which takes a string as an argument, this is fired every time the search is submitted. Do what you want with the result. + final TextFieldSubmitCallback? onSubmitted; + + /// A void callback which gets fired on close button press. + final VoidCallback? onClosed; + + /// A callback which is fired when clear button is pressed. + final VoidCallback? onCleared; + + /// Since this should be inside of a State class, just pass setState to this. + final SetStateCallback setState; + + /// Whether or not the search bar should add a clear input button, defaults to true. + final bool showClearButton; + + /// What the hintText on the search bar should be. Defaults to 'Search'. + final String hintText; + + /// Whether search is currently active. + final ValueNotifier isSearching = ValueNotifier(false); + + /// A callback which is invoked each time the text field's value changes + final TextFieldChangeCallback? onChanged; + + /// The type of keyboard to use for editing the search bar text. Defaults to 'TextInputType.text'. + final TextInputType keyboardType; + + /// The controller to be used in the textField. + late TextEditingController controller; + + /// Whether the clear button should be active (fully colored) or inactive (greyed out) + bool _clearActive = false; + + SearchBar({ + required this.setState, + required this.buildDefaultAppBar, + this.onSubmitted, + TextEditingController? controller, + this.hintText = 'Search', + this.inBar = true, + this.closeOnSubmit = true, + this.clearOnSubmit = true, + this.showClearButton = true, + this.onChanged, + this.onClosed, + this.onCleared, + this.keyboardType = TextInputType.text, + }) { + this.controller = controller ?? new TextEditingController(); + + // Don't waste resources on listeners for the text controller if the dev + // doesn't want a clear button anyways in the search bar + if (!this.showClearButton) { + return; + } + + this.controller.addListener(() { + if (this.controller.text.isEmpty) { + // If clear is already disabled, don't disable it + if (_clearActive) { + setState(() { + _clearActive = false; + }); + } + + return; + } + + // If clear is already enabled, don't enable it + if (!_clearActive) { + setState(() { + _clearActive = true; + }); + } + }); + } + + /// Initializes the search bar. + /// + /// This adds a route that listens for onRemove (and stops the search when that happens), and then calls [setState] to rebuild and start the search. + void beginSearch(context) { + ModalRoute.of(context)!.addLocalHistoryEntry(LocalHistoryEntry(onRemove: () { + setState(() { + isSearching.value = false; + }); + })); + + setState(() { + isSearching.value = true; + }); + } + + /// Builds, saves and returns the default app bar. + /// + /// This calls the [buildDefaultAppBar] provided in the constructor. + AppBar buildAppBar(BuildContext context) { + return buildDefaultAppBar(context) as AppBar; + } + + /// Builds the search bar! + /// + /// The leading will always be a back button. + /// backgroundColor is determined by the value of inBar + /// title is always a [TextField] with the key 'SearchBarTextField', and various text stylings based on [inBar]. This is also where [onSubmitted] has its listener registered. + /// + AppBar buildSearchBar(BuildContext context) { + ThemeData theme = Theme.of(context); + Color? buttonColor = inBar ? null : theme.iconTheme.color; + + return AppBar( + leading: IconButton( + icon: const BackButtonIcon(), + color: buttonColor, + tooltip: MaterialLocalizations.of(context).backButtonTooltip, + onPressed: () { + onClosed?.call(); + controller.clear(); + Navigator.maybePop(context); + }), + backgroundColor: inBar ? null : theme.canvasColor, + title: Directionality( + textDirection: Directionality.of(context), + child: TextField( + key: Key('SearchBarTextField'), + keyboardType: keyboardType, + decoration: InputDecoration( + hintText: hintText, + hintStyle: inBar + ? null + : TextStyle( + color: theme.textTheme.bodyMedium!.color, + ), + enabledBorder: InputBorder.none, + focusedBorder: InputBorder.none, + border: InputBorder.none), + onChanged: this.onChanged, + onSubmitted: (String val) async { + if (closeOnSubmit) { + await Navigator.maybePop(context); + } + + if (clearOnSubmit) { + controller.clear(); + } + onSubmitted?.call(val); + }, + autofocus: true, + controller: controller, + ), + ), + actions: !showClearButton + ? null + : [ + // Show an icon if clear is not active, so there's no ripple on tap + IconButton( + icon: Icon(Icons.clear, semanticLabel: "Clear"), + color: inBar ? null : buttonColor, + disabledColor: inBar ? null : theme.disabledColor, + onPressed: !_clearActive + ? null + : () { + onCleared?.call(); + controller.clear(); + }), + ], + ); + } + + /// Returns an [IconButton] suitable for an Action + /// + /// Put this inside your [buildDefaultAppBar] method! + IconButton getSearchAction(BuildContext context) { + return IconButton( + icon: Icon(Icons.search, semanticLabel: "Search"), + onPressed: () { + beginSearch(context); + }); + } + + /// Returns an AppBar based on the value of [isSearching] + AppBar build(BuildContext context) { + return isSearching.value ? buildSearchBar(context) : buildAppBar(context); + } +} diff --git a/lib/screens/discovery_screen.dart b/lib/screens/discovery_screen.dart index 1c7262b..a0a8c62 100644 --- a/lib/screens/discovery_screen.dart +++ b/lib/screens/discovery_screen.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:kobi/screens/comic_search_screen.dart'; -import 'package:flutter_search_bar/flutter_search_bar.dart' as sb; +import 'components/flutter_search_bar_base.dart' as sb; import '../src/rust/api/api.dart' as api; import '../src/rust/udto.dart'; import 'components/comic_card.dart'; diff --git a/lib/screens/histories_screen.dart b/lib/screens/histories_screen.dart index 7a30a4f..f506df3 100644 --- a/lib/screens/histories_screen.dart +++ b/lib/screens/histories_screen.dart @@ -12,7 +12,7 @@ class HistoriesScreen extends StatelessWidget { @override Widget build(BuildContext context) { final pager = ComicPager(fetcher: (offset, limit) async { - final result = await api.listComicViewLogs(offset: offset, limit: limit); + final result = await api.listComicViewLogs(offset: offset.toInt(), limit: limit.toInt()); return CommonPage( list: result.list .map((e) => CommonComicInfo( diff --git a/lib/src/rust/api/api.dart b/lib/src/rust/api/api.dart index 7f6770b..49c395c 100644 --- a/lib/src/rust/api/api.dart +++ b/lib/src/rust/api/api.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.3.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -8,162 +8,141 @@ import '../frb_generated.dart'; import '../udto.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -Future init({required String root, dynamic hint}) => - RustLib.instance.api.init(root: root, hint: hint); +// These functions are ignored because they are not marked as `pub`: `block_on`, `clean_image`, `clean_web`, `collect_to_account_move`, `http_get_inner`, `member_from_result` -Future saveProperty( - {required String k, required String v, dynamic hint}) => - RustLib.instance.api.saveProperty(k: k, v: v, hint: hint); +Future init({required String root}) => + RustLib.instance.api.crateApiApiInit(root: root); -Future loadProperty({required String k, dynamic hint}) => - RustLib.instance.api.loadProperty(k: k, hint: hint); +Future saveProperty({required String k, required String v}) => + RustLib.instance.api.crateApiApiSaveProperty(k: k, v: v); -Future getProxy({dynamic hint}) => - RustLib.instance.api.getProxy(hint: hint); +Future loadProperty({required String k}) => + RustLib.instance.api.crateApiApiLoadProperty(k: k); -Future setProxy({required String proxy, dynamic hint}) => - RustLib.instance.api.setProxy(proxy: proxy, hint: hint); +Future getProxy() => RustLib.instance.api.crateApiApiGetProxy(); -Future initLoginState({dynamic hint}) => - RustLib.instance.api.initLoginState(hint: hint); +Future setProxy({required String proxy}) => + RustLib.instance.api.crateApiApiSetProxy(proxy: proxy); + +Future initLoginState() => + RustLib.instance.api.crateApiApiInitLoginState(); Future login( - {required String username, required String password, dynamic hint}) => + {required String username, required String password}) => RustLib.instance.api - .login(username: username, password: password, hint: hint); + .crateApiApiLogin(username: username, password: password); Future register( - {required String username, required String password, dynamic hint}) => + {required String username, required String password}) => RustLib.instance.api - .register(username: username, password: password, hint: hint); + .crateApiApiRegister(username: username, password: password); Future rank( {required String dateType, - required int offset, - required int limit, - dynamic hint}) => + required BigInt offset, + required BigInt limit}) => RustLib.instance.api - .rank(dateType: dateType, offset: offset, limit: limit, hint: hint); + .crateApiApiRank(dateType: dateType, offset: offset, limit: limit); Future recommends( - {required int offset, required int limit, dynamic hint}) => - RustLib.instance.api.recommends(offset: offset, limit: limit, hint: hint); + {required BigInt offset, required BigInt limit}) => + RustLib.instance.api.crateApiApiRecommends(offset: offset, limit: limit); -Future comic({required String pathWord, dynamic hint}) => - RustLib.instance.api.comic(pathWord: pathWord, hint: hint); +Future comic({required String pathWord}) => + RustLib.instance.api.crateApiApiComic(pathWord: pathWord); Future comicChapters( {required String comicPathWord, required String groupPathWord, - required int limit, - required int offset, - dynamic hint}) => - RustLib.instance.api.comicChapters( + required BigInt limit, + required BigInt offset}) => + RustLib.instance.api.crateApiApiComicChapters( comicPathWord: comicPathWord, groupPathWord: groupPathWord, limit: limit, - offset: offset, - hint: hint); + offset: offset); -Future comicQuery({required String pathWord, dynamic hint}) => - RustLib.instance.api.comicQuery(pathWord: pathWord, hint: hint); +Future comicQuery({required String pathWord}) => + RustLib.instance.api.crateApiApiComicQuery(pathWord: pathWord); Future comicChapterData( - {required String comicPathWord, - required String chapterUuid, - dynamic hint}) => - RustLib.instance.api.comicChapterData( - comicPathWord: comicPathWord, chapterUuid: chapterUuid, hint: hint); + {required String comicPathWord, required String chapterUuid}) => + RustLib.instance.api.crateApiApiComicChapterData( + comicPathWord: comicPathWord, chapterUuid: chapterUuid); -Future tags({dynamic hint}) => RustLib.instance.api.tags(hint: hint); +Future tags() => RustLib.instance.api.crateApiApiTags(); Future explorer( {String? ordering, String? top, String? theme, - required int offset, - required int limit, - dynamic hint}) => - RustLib.instance.api.explorer( + required BigInt offset, + required BigInt limit}) => + RustLib.instance.api.crateApiApiExplorer( ordering: ordering, top: top, theme: theme, offset: offset, - limit: limit, - hint: hint); + limit: limit); Future comicSearch( {required String qType, required String q, - required int offset, - required int limit, - dynamic hint}) => - RustLib.instance.api.comicSearch( - qType: qType, q: q, offset: offset, limit: limit, hint: hint); + required BigInt offset, + required BigInt limit}) => + RustLib.instance.api.crateApiApiComicSearch( + qType: qType, q: q, offset: offset, limit: limit); Future viewComicInfo( {required String comicPathWord, required String comicName, required List comicAuthors, - required String comicCover, - dynamic hint}) => - RustLib.instance.api.viewComicInfo( + required String comicCover}) => + RustLib.instance.api.crateApiApiViewComicInfo( comicPathWord: comicPathWord, comicName: comicName, comicAuthors: comicAuthors, - comicCover: comicCover, - hint: hint); + comicCover: comicCover); Future viewChapterPage( {required String comicPathWord, required String chapterUuid, required String chapterName, - required int chapterOrdered, - required int chapterSize, - required int chapterCount, - required int pageRank, - dynamic hint}) => - RustLib.instance.api.viewChapterPage( + required PlatformInt64 chapterOrdered, + required PlatformInt64 chapterSize, + required PlatformInt64 chapterCount, + required int pageRank}) => + RustLib.instance.api.crateApiApiViewChapterPage( comicPathWord: comicPathWord, chapterUuid: chapterUuid, chapterName: chapterName, chapterOrdered: chapterOrdered, chapterSize: chapterSize, chapterCount: chapterCount, - pageRank: pageRank, - hint: hint); + pageRank: pageRank); -Future findComicViewLog({required String pathWord, dynamic hint}) => - RustLib.instance.api.findComicViewLog(pathWord: pathWord, hint: hint); +Future findComicViewLog({required String pathWord}) => + RustLib.instance.api.crateApiApiFindComicViewLog(pathWord: pathWord); Future listComicViewLogs( - {required int offset, required int limit, dynamic hint}) => + {required PlatformInt64 offset, required PlatformInt64 limit}) => RustLib.instance.api - .listComicViewLogs(offset: offset, limit: limit, hint: hint); + .crateApiApiListComicViewLogs(offset: offset, limit: limit); Future collectToAccount( {required String comicId, required bool isCollect, - required String comicPathWord, - dynamic hint}) => - RustLib.instance.api.collectToAccount( - comicId: comicId, - isCollect: isCollect, - comicPathWord: comicPathWord, - hint: hint); + required String comicPathWord}) => + RustLib.instance.api.crateApiApiCollectToAccount( + comicId: comicId, isCollect: isCollect, comicPathWord: comicPathWord); Future collectFromAccount( - {required int freeType, + {required PlatformInt64 freeType, required String ordering, - required int offset, - required int limit, - dynamic hint}) => - RustLib.instance.api.collectFromAccount( - freeType: freeType, - ordering: ordering, - offset: offset, - limit: limit, - hint: hint); + required BigInt offset, + required BigInt limit}) => + RustLib.instance.api.crateApiApiCollectFromAccount( + freeType: freeType, ordering: ordering, offset: offset, limit: limit); Future cacheImage( {required String cacheKey, @@ -171,76 +150,66 @@ Future cacheImage( required String useful, String? extendsFieldFirst, String? extendsFieldSecond, - String? extendsFieldThird, - dynamic hint}) => - RustLib.instance.api.cacheImage( + String? extendsFieldThird}) => + RustLib.instance.api.crateApiApiCacheImage( cacheKey: cacheKey, url: url, useful: useful, extendsFieldFirst: extendsFieldFirst, extendsFieldSecond: extendsFieldSecond, - extendsFieldThird: extendsFieldThird, - hint: hint); + extendsFieldThird: extendsFieldThird); -Future cleanCache({required int time, dynamic hint}) => - RustLib.instance.api.cleanCache(time: time, hint: hint); +Future cleanCache({required PlatformInt64 time}) => + RustLib.instance.api.crateApiApiCleanCache(time: time); -Future deleteDownloadComic( - {required String comicPathWord, dynamic hint}) => +Future deleteDownloadComic({required String comicPathWord}) => RustLib.instance.api - .deleteDownloadComic(comicPathWord: comicPathWord, hint: hint); + .crateApiApiDeleteDownloadComic(comicPathWord: comicPathWord); -Future appendDownload( - {required UIQueryDownloadComic data, dynamic hint}) => - RustLib.instance.api.appendDownload(data: data, hint: hint); +Future appendDownload({required UIQueryDownloadComic data}) => + RustLib.instance.api.crateApiApiAppendDownload(data: data); -Future> inDownloadChapterUuid( - {required String comicPathWord, dynamic hint}) => +Future> inDownloadChapterUuid({required String comicPathWord}) => RustLib.instance.api - .inDownloadChapterUuid(comicPathWord: comicPathWord, hint: hint); + .crateApiApiInDownloadChapterUuid(comicPathWord: comicPathWord); -Future resetFailDownloads({dynamic hint}) => - RustLib.instance.api.resetFailDownloads(hint: hint); +Future resetFailDownloads() => + RustLib.instance.api.crateApiApiResetFailDownloads(); -Future> downloadComics({dynamic hint}) => - RustLib.instance.api.downloadComics(hint: hint); +Future> downloadComics() => + RustLib.instance.api.crateApiApiDownloadComics(); Future> downloadComicGroups( - {required String comicPathWord, dynamic hint}) => + {required String comicPathWord}) => RustLib.instance.api - .downloadComicGroups(comicPathWord: comicPathWord, hint: hint); + .crateApiApiDownloadComicGroups(comicPathWord: comicPathWord); Future> downloadComicChapters( - {required String comicPathWord, dynamic hint}) => + {required String comicPathWord}) => RustLib.instance.api - .downloadComicChapters(comicPathWord: comicPathWord, hint: hint); + .crateApiApiDownloadComicChapters(comicPathWord: comicPathWord); Future> downloadComicPages( - {required String comicPathWord, - required String chapterUuid, - dynamic hint}) => - RustLib.instance.api.downloadComicPages( - comicPathWord: comicPathWord, chapterUuid: chapterUuid, hint: hint); + {required String comicPathWord, required String chapterUuid}) => + RustLib.instance.api.crateApiApiDownloadComicPages( + comicPathWord: comicPathWord, chapterUuid: chapterUuid); -Future downloadIsPause({dynamic hint}) => - RustLib.instance.api.downloadIsPause(hint: hint); +Future downloadIsPause() => + RustLib.instance.api.crateApiApiDownloadIsPause(); -Future downloadSetPause({required bool pause, dynamic hint}) => - RustLib.instance.api.downloadSetPause(pause: pause, hint: hint); +Future downloadSetPause({required bool pause}) => + RustLib.instance.api.crateApiApiDownloadSetPause(pause: pause); -Future httpGet({required String url, dynamic hint}) => - RustLib.instance.api.httpGet(url: url, hint: hint); +Future httpGet({required String url}) => + RustLib.instance.api.crateApiApiHttpGet(url: url); -Future desktopRoot({dynamic hint}) => - RustLib.instance.api.desktopRoot(hint: hint); +Future desktopRoot() => RustLib.instance.api.crateApiApiDesktopRoot(); Future exports( {required List uuidList, required String exportToFolder, - required ExportsType exportsType, - dynamic hint}) => - RustLib.instance.api.exports( + required ExportsType exportsType}) => + RustLib.instance.api.crateApiApiExports( uuidList: uuidList, exportToFolder: exportToFolder, - exportsType: exportsType, - hint: hint); + exportsType: exportsType); diff --git a/lib/src/rust/api/simple.dart b/lib/src/rust/api/simple.dart new file mode 100644 index 0000000..38d4dbc --- /dev/null +++ b/lib/src/rust/api/simple.dart @@ -0,0 +1,10 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.3.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +String greet({required String name}) => + RustLib.instance.api.crateApiSimpleGreet(name: name); diff --git a/lib/src/rust/copy_client/dtos.dart b/lib/src/rust/copy_client/dtos.dart index 877bfb8..f13e5b8 100644 --- a/lib/src/rust/copy_client/dtos.dart +++ b/lib/src/rust/copy_client/dtos.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.3.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -117,7 +117,7 @@ class ChapterImage { class ClassifyItem { final String display; - final int value; + final PlatformInt64 value; const ClassifyItem({ required this.display, @@ -137,7 +137,7 @@ class ClassifyItem { } class CollectedComic { - final int uuid; + final PlatformInt64 uuid; final String? name; final bool bFolder; final String? folderId; @@ -185,8 +185,8 @@ class CollectedComicInfo { final List author; final List theme; final String cover; - final int status; - final int popular; + final PlatformInt64 status; + final PlatformInt64 popular; final String datetimeUpdated; final String lastChapterId; final String lastChapterName; @@ -247,7 +247,7 @@ class CollectedComicInfo { } class Group { - final int count; + final PlatformInt64 count; final String name; final String pathWord; @@ -320,27 +320,27 @@ class MemberInfo { final bool isAuthenticated; final String datetimeCreated; final bool bVerifyEmail; - final String email; + final String? email; final String? mobile; final String? mobileRegion; - final int point; - final int comicVip; + final PlatformInt64 point; + final PlatformInt64 comicVip; final String? comicVipEnd; final String? comicVipStart; - final int cartoonVip; + final PlatformInt64 cartoonVip; final String? cartoonVipEnd; final String? cartoonVipStart; final String? adsVipEnd; final bool closeReport; - final int downloads; - final int vipDownloads; - final int rewardDownloads; + final PlatformInt64 downloads; + final PlatformInt64 vipDownloads; + final PlatformInt64 rewardDownloads; final String? inviteCode; final String? invited; final bool bSstv; final bool scyAnswer; final String dayDownloadsRefresh; - final int dayDownloads; + final PlatformInt64 dayDownloads; const MemberInfo({ required this.userId, @@ -350,7 +350,7 @@ class MemberInfo { required this.isAuthenticated, required this.datetimeCreated, required this.bVerifyEmail, - required this.email, + this.email, this.mobile, this.mobileRegion, required this.point, @@ -485,7 +485,7 @@ class RegisterResult { class SexualOrientation { final String name; final String pathWord; - final int gender; + final PlatformInt64 gender; const SexualOrientation({ required this.name, diff --git a/lib/src/rust/frb_generated.dart b/lib/src/rust/frb_generated.dart index 78931a4..62e7441 100644 --- a/lib/src/rust/frb_generated.dart +++ b/lib/src/rust/frb_generated.dart @@ -1,13 +1,16 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.3.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 import 'api/api.dart'; +import 'api/simple.dart'; import 'copy_client/dtos.dart'; import 'dart:async'; import 'dart:convert'; -import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart'; +import 'frb_generated.dart'; +import 'frb_generated.io.dart' + if (dart.library.js_interop) 'frb_generated.web.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'udto.dart'; @@ -31,6 +34,16 @@ class RustLib extends BaseEntrypoint { ); } + /// Initialize flutter_rust_bridge in mock mode. + /// No libraries for FFI are loaded. + static void initMock({ + required RustLibApi api, + }) { + instance.initMockImpl( + api: api, + ); + } + /// Dispose flutter_rust_bridge /// /// The call to this function is optional, since flutter_rust_bridge (and everything else) @@ -46,17 +59,19 @@ class RustLib extends BaseEntrypoint { RustLibWire.fromExternalLibrary; @override - Future executeRustInitializers() async {} + Future executeRustInitializers() async { + await api.crateApiSimpleInitApp(); + } @override ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0-dev.32'; + String get codegenVersion => '2.3.0'; @override - int get rustContentHash => 1861589029; + int get rustContentHash => 1083111246; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -67,150 +82,137 @@ class RustLib extends BaseEntrypoint { } abstract class RustLibApi extends BaseApi { - Future appendDownload( - {required UIQueryDownloadComic data, dynamic hint}); + Future crateApiApiAppendDownload({required UIQueryDownloadComic data}); - Future cacheImage( + Future crateApiApiCacheImage( {required String cacheKey, required String url, required String useful, String? extendsFieldFirst, String? extendsFieldSecond, - String? extendsFieldThird, - dynamic hint}); + String? extendsFieldThird}); - Future cleanCache({required int time, dynamic hint}); + Future crateApiApiCleanCache({required PlatformInt64 time}); - Future collectFromAccount( - {required int freeType, + Future crateApiApiCollectFromAccount( + {required PlatformInt64 freeType, required String ordering, - required int offset, - required int limit, - dynamic hint}); + required BigInt offset, + required BigInt limit}); - Future collectToAccount( + Future crateApiApiCollectToAccount( {required String comicId, required bool isCollect, - required String comicPathWord, - dynamic hint}); + required String comicPathWord}); - Future comic({required String pathWord, dynamic hint}); + Future crateApiApiComic({required String pathWord}); - Future comicChapterData( - {required String comicPathWord, - required String chapterUuid, - dynamic hint}); + Future crateApiApiComicChapterData( + {required String comicPathWord, required String chapterUuid}); - Future comicChapters( + Future crateApiApiComicChapters( {required String comicPathWord, required String groupPathWord, - required int limit, - required int offset, - dynamic hint}); + required BigInt limit, + required BigInt offset}); - Future comicQuery({required String pathWord, dynamic hint}); + Future crateApiApiComicQuery({required String pathWord}); - Future comicSearch( + Future crateApiApiComicSearch( {required String qType, required String q, - required int offset, - required int limit, - dynamic hint}); + required BigInt offset, + required BigInt limit}); - Future deleteDownloadComic( - {required String comicPathWord, dynamic hint}); + Future crateApiApiDeleteDownloadComic({required String comicPathWord}); - Future desktopRoot({dynamic hint}); + Future crateApiApiDesktopRoot(); - Future> downloadComicChapters( - {required String comicPathWord, dynamic hint}); + Future> crateApiApiDownloadComicChapters( + {required String comicPathWord}); - Future> downloadComicGroups( - {required String comicPathWord, dynamic hint}); + Future> crateApiApiDownloadComicGroups( + {required String comicPathWord}); - Future> downloadComicPages( - {required String comicPathWord, - required String chapterUuid, - dynamic hint}); + Future> crateApiApiDownloadComicPages( + {required String comicPathWord, required String chapterUuid}); - Future> downloadComics({dynamic hint}); + Future> crateApiApiDownloadComics(); - Future downloadIsPause({dynamic hint}); + Future crateApiApiDownloadIsPause(); - Future downloadSetPause({required bool pause, dynamic hint}); + Future crateApiApiDownloadSetPause({required bool pause}); - Future explorer( + Future crateApiApiExplorer( {String? ordering, String? top, String? theme, - required int offset, - required int limit, - dynamic hint}); + required BigInt offset, + required BigInt limit}); - Future exports( + Future crateApiApiExports( {required List uuidList, required String exportToFolder, - required ExportsType exportsType, - dynamic hint}); + required ExportsType exportsType}); - Future findComicViewLog({required String pathWord, dynamic hint}); + Future crateApiApiFindComicViewLog({required String pathWord}); - Future getProxy({dynamic hint}); + Future crateApiApiGetProxy(); - Future httpGet({required String url, dynamic hint}); + Future crateApiApiHttpGet({required String url}); - Future> inDownloadChapterUuid( - {required String comicPathWord, dynamic hint}); + Future> crateApiApiInDownloadChapterUuid( + {required String comicPathWord}); - Future init({required String root, dynamic hint}); + Future crateApiApiInit({required String root}); - Future initLoginState({dynamic hint}); + Future crateApiApiInitLoginState(); - Future listComicViewLogs( - {required int offset, required int limit, dynamic hint}); + Future crateApiApiListComicViewLogs( + {required PlatformInt64 offset, required PlatformInt64 limit}); - Future loadProperty({required String k, dynamic hint}); + Future crateApiApiLoadProperty({required String k}); - Future login( - {required String username, required String password, dynamic hint}); + Future crateApiApiLogin( + {required String username, required String password}); - Future rank( + Future crateApiApiRank( {required String dateType, - required int offset, - required int limit, - dynamic hint}); + required BigInt offset, + required BigInt limit}); - Future recommends( - {required int offset, required int limit, dynamic hint}); + Future crateApiApiRecommends( + {required BigInt offset, required BigInt limit}); - Future register( - {required String username, required String password, dynamic hint}); + Future crateApiApiRegister( + {required String username, required String password}); - Future resetFailDownloads({dynamic hint}); + Future crateApiApiResetFailDownloads(); - Future saveProperty( - {required String k, required String v, dynamic hint}); + Future crateApiApiSaveProperty({required String k, required String v}); - Future setProxy({required String proxy, dynamic hint}); + Future crateApiApiSetProxy({required String proxy}); - Future tags({dynamic hint}); + Future crateApiApiTags(); - Future viewChapterPage( + Future crateApiApiViewChapterPage( {required String comicPathWord, required String chapterUuid, required String chapterName, - required int chapterOrdered, - required int chapterSize, - required int chapterCount, - required int pageRank, - dynamic hint}); + required PlatformInt64 chapterOrdered, + required PlatformInt64 chapterSize, + required PlatformInt64 chapterCount, + required int pageRank}); - Future viewComicInfo( + Future crateApiApiViewComicInfo( {required String comicPathWord, required String comicName, required List comicAuthors, - required String comicCover, - dynamic hint}); + required String comicCover}); + + String crateApiSimpleGreet({required String name}); + + Future crateApiSimpleInitApp(); } class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @@ -222,40 +224,37 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { }); @override - Future appendDownload( - {required UIQueryDownloadComic data, dynamic hint}) { + Future crateApiApiAppendDownload({required UIQueryDownloadComic data}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_ui_query_download_comic(data, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 27, port: port_); + funcId: 1, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kAppendDownloadConstMeta, + constMeta: kCrateApiApiAppendDownloadConstMeta, argValues: [data], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kAppendDownloadConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiAppendDownloadConstMeta => const TaskConstMeta( debugName: "append_download", argNames: ["data"], ); @override - Future cacheImage( + Future crateApiApiCacheImage( {required String cacheKey, required String url, required String useful, String? extendsFieldFirst, String? extendsFieldSecond, - String? extendsFieldThird, - dynamic hint}) { + String? extendsFieldThird}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -266,13 +265,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_opt_String(extendsFieldSecond, serializer); sse_encode_opt_String(extendsFieldThird, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 24, port: port_); + funcId: 2, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_cache_image, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kCacheImageConstMeta, + constMeta: kCrateApiApiCacheImageConstMeta, argValues: [ cacheKey, url, @@ -282,11 +281,10 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { extendsFieldThird ], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kCacheImageConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiCacheImageConstMeta => const TaskConstMeta( debugName: "cache_image", argNames: [ "cacheKey", @@ -299,37 +297,35 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future cleanCache({required int time, dynamic hint}) { + Future crateApiApiCleanCache({required PlatformInt64 time}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_i_64(time, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 25, port: port_); + funcId: 3, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kCleanCacheConstMeta, + constMeta: kCrateApiApiCleanCacheConstMeta, argValues: [time], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kCleanCacheConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiCleanCacheConstMeta => const TaskConstMeta( debugName: "clean_cache", argNames: ["time"], ); @override - Future collectFromAccount( - {required int freeType, + Future crateApiApiCollectFromAccount( + {required PlatformInt64 freeType, required String ordering, - required int offset, - required int limit, - dynamic hint}) { + required BigInt offset, + required BigInt limit}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -338,30 +334,29 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_u_64(offset, serializer); sse_encode_u_64(limit, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 23, port: port_); + funcId: 4, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_page_collected_comic, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kCollectFromAccountConstMeta, + constMeta: kCrateApiApiCollectFromAccountConstMeta, argValues: [freeType, ordering, offset, limit], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kCollectFromAccountConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiCollectFromAccountConstMeta => + const TaskConstMeta( debugName: "collect_from_account", argNames: ["freeType", "ordering", "offset", "limit"], ); @override - Future collectToAccount( + Future crateApiApiCollectToAccount( {required String comicId, required bool isCollect, - required String comicPathWord, - dynamic hint}) { + required String comicPathWord}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -369,85 +364,81 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_bool(isCollect, serializer); sse_encode_String(comicPathWord, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 22, port: port_); + funcId: 5, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kCollectToAccountConstMeta, + constMeta: kCrateApiApiCollectToAccountConstMeta, argValues: [comicId, isCollect, comicPathWord], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kCollectToAccountConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiCollectToAccountConstMeta => + const TaskConstMeta( debugName: "collect_to_account", argNames: ["comicId", "isCollect", "comicPathWord"], ); @override - Future comic({required String pathWord, dynamic hint}) { + Future crateApiApiComic({required String pathWord}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(pathWord, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 11, port: port_); + funcId: 6, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_comic_data, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kComicConstMeta, + constMeta: kCrateApiApiComicConstMeta, argValues: [pathWord], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kComicConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiComicConstMeta => const TaskConstMeta( debugName: "comic", argNames: ["pathWord"], ); @override - Future comicChapterData( - {required String comicPathWord, - required String chapterUuid, - dynamic hint}) { + Future crateApiApiComicChapterData( + {required String comicPathWord, required String chapterUuid}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(comicPathWord, serializer); sse_encode_String(chapterUuid, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 14, port: port_); + funcId: 7, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_chapter_data, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kComicChapterDataConstMeta, + constMeta: kCrateApiApiComicChapterDataConstMeta, argValues: [comicPathWord, chapterUuid], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kComicChapterDataConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiComicChapterDataConstMeta => + const TaskConstMeta( debugName: "comic_chapter_data", argNames: ["comicPathWord", "chapterUuid"], ); @override - Future comicChapters( + Future crateApiApiComicChapters( {required String comicPathWord, required String groupPathWord, - required int limit, - required int offset, - dynamic hint}) { + required BigInt limit, + required BigInt offset}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -456,56 +447,53 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_u_64(limit, serializer); sse_encode_u_64(offset, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 12, port: port_); + funcId: 8, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_page_comic_chapter, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kComicChaptersConstMeta, + constMeta: kCrateApiApiComicChaptersConstMeta, argValues: [comicPathWord, groupPathWord, limit, offset], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kComicChaptersConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiComicChaptersConstMeta => const TaskConstMeta( debugName: "comic_chapters", argNames: ["comicPathWord", "groupPathWord", "limit", "offset"], ); @override - Future comicQuery({required String pathWord, dynamic hint}) { + Future crateApiApiComicQuery({required String pathWord}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(pathWord, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 13, port: port_); + funcId: 9, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_comic_query, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kComicQueryConstMeta, + constMeta: kCrateApiApiComicQueryConstMeta, argValues: [pathWord], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kComicQueryConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiComicQueryConstMeta => const TaskConstMeta( debugName: "comic_query", argNames: ["pathWord"], ); @override - Future comicSearch( + Future crateApiApiComicSearch( {required String qType, required String q, - required int offset, - required int limit, - dynamic hint}) { + required BigInt offset, + required BigInt limit}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -514,236 +502,228 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_u_64(offset, serializer); sse_encode_u_64(limit, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 17, port: port_); + funcId: 10, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_page_ui_comic_in_list, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kComicSearchConstMeta, + constMeta: kCrateApiApiComicSearchConstMeta, argValues: [qType, q, offset, limit], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kComicSearchConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiComicSearchConstMeta => const TaskConstMeta( debugName: "comic_search", argNames: ["qType", "q", "offset", "limit"], ); @override - Future deleteDownloadComic( - {required String comicPathWord, dynamic hint}) { + Future crateApiApiDeleteDownloadComic({required String comicPathWord}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(comicPathWord, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 26, port: port_); + funcId: 11, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kDeleteDownloadComicConstMeta, + constMeta: kCrateApiApiDeleteDownloadComicConstMeta, argValues: [comicPathWord], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kDeleteDownloadComicConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiDeleteDownloadComicConstMeta => + const TaskConstMeta( debugName: "delete_download_comic", argNames: ["comicPathWord"], ); @override - Future desktopRoot({dynamic hint}) { + Future crateApiApiDesktopRoot() { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 37, port: port_); + funcId: 12, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kDesktopRootConstMeta, + constMeta: kCrateApiApiDesktopRootConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kDesktopRootConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiDesktopRootConstMeta => const TaskConstMeta( debugName: "desktop_root", argNames: [], ); @override - Future> downloadComicChapters( - {required String comicPathWord, dynamic hint}) { + Future> crateApiApiDownloadComicChapters( + {required String comicPathWord}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(comicPathWord, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 32, port: port_); + funcId: 13, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_list_ui_download_comic_chapter, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kDownloadComicChaptersConstMeta, + constMeta: kCrateApiApiDownloadComicChaptersConstMeta, argValues: [comicPathWord], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kDownloadComicChaptersConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiDownloadComicChaptersConstMeta => + const TaskConstMeta( debugName: "download_comic_chapters", argNames: ["comicPathWord"], ); @override - Future> downloadComicGroups( - {required String comicPathWord, dynamic hint}) { + Future> crateApiApiDownloadComicGroups( + {required String comicPathWord}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(comicPathWord, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 31, port: port_); + funcId: 14, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_list_ui_download_comic_group, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kDownloadComicGroupsConstMeta, + constMeta: kCrateApiApiDownloadComicGroupsConstMeta, argValues: [comicPathWord], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kDownloadComicGroupsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiDownloadComicGroupsConstMeta => + const TaskConstMeta( debugName: "download_comic_groups", argNames: ["comicPathWord"], ); @override - Future> downloadComicPages( - {required String comicPathWord, - required String chapterUuid, - dynamic hint}) { + Future> crateApiApiDownloadComicPages( + {required String comicPathWord, required String chapterUuid}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(comicPathWord, serializer); sse_encode_String(chapterUuid, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 33, port: port_); + funcId: 15, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_list_ui_download_comic_page, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kDownloadComicPagesConstMeta, + constMeta: kCrateApiApiDownloadComicPagesConstMeta, argValues: [comicPathWord, chapterUuid], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kDownloadComicPagesConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiDownloadComicPagesConstMeta => + const TaskConstMeta( debugName: "download_comic_pages", argNames: ["comicPathWord", "chapterUuid"], ); @override - Future> downloadComics({dynamic hint}) { + Future> crateApiApiDownloadComics() { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 30, port: port_); + funcId: 16, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_list_ui_download_comic, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kDownloadComicsConstMeta, + constMeta: kCrateApiApiDownloadComicsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kDownloadComicsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiDownloadComicsConstMeta => const TaskConstMeta( debugName: "download_comics", argNames: [], ); @override - Future downloadIsPause({dynamic hint}) { + Future crateApiApiDownloadIsPause() { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 34, port: port_); + funcId: 17, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_bool, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kDownloadIsPauseConstMeta, + constMeta: kCrateApiApiDownloadIsPauseConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kDownloadIsPauseConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiDownloadIsPauseConstMeta => const TaskConstMeta( debugName: "download_is_pause", argNames: [], ); @override - Future downloadSetPause({required bool pause, dynamic hint}) { + Future crateApiApiDownloadSetPause({required bool pause}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_bool(pause, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 35, port: port_); + funcId: 18, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kDownloadSetPauseConstMeta, + constMeta: kCrateApiApiDownloadSetPauseConstMeta, argValues: [pause], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kDownloadSetPauseConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiDownloadSetPauseConstMeta => + const TaskConstMeta( debugName: "download_set_pause", argNames: ["pause"], ); @override - Future explorer( + Future crateApiApiExplorer( {String? ordering, String? top, String? theme, - required int offset, - required int limit, - dynamic hint}) { + required BigInt offset, + required BigInt limit}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -753,30 +733,28 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_u_64(offset, serializer); sse_encode_u_64(limit, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 16, port: port_); + funcId: 19, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_page_comic_in_explore, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kExplorerConstMeta, + constMeta: kCrateApiApiExplorerConstMeta, argValues: [ordering, top, theme, offset, limit], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kExplorerConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiExplorerConstMeta => const TaskConstMeta( debugName: "explorer", argNames: ["ordering", "top", "theme", "offset", "limit"], ); @override - Future exports( + Future crateApiApiExports( {required List uuidList, required String exportToFolder, - required ExportsType exportsType, - dynamic hint}) { + required ExportsType exportsType}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -784,259 +762,250 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(exportToFolder, serializer); sse_encode_exports_type(exportsType, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 38, port: port_); + funcId: 20, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kExportsConstMeta, + constMeta: kCrateApiApiExportsConstMeta, argValues: [uuidList, exportToFolder, exportsType], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kExportsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiExportsConstMeta => const TaskConstMeta( debugName: "exports", argNames: ["uuidList", "exportToFolder", "exportsType"], ); @override - Future findComicViewLog( - {required String pathWord, dynamic hint}) { + Future crateApiApiFindComicViewLog({required String pathWord}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(pathWord, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 20, port: port_); + funcId: 21, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_opt_box_autoadd_ui_view_log, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kFindComicViewLogConstMeta, + constMeta: kCrateApiApiFindComicViewLogConstMeta, argValues: [pathWord], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kFindComicViewLogConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiFindComicViewLogConstMeta => + const TaskConstMeta( debugName: "find_comic_view_log", argNames: ["pathWord"], ); @override - Future getProxy({dynamic hint}) { + Future crateApiApiGetProxy() { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 4, port: port_); + funcId: 22, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kGetProxyConstMeta, + constMeta: kCrateApiApiGetProxyConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kGetProxyConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiGetProxyConstMeta => const TaskConstMeta( debugName: "get_proxy", argNames: [], ); @override - Future httpGet({required String url, dynamic hint}) { + Future crateApiApiHttpGet({required String url}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(url, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 36, port: port_); + funcId: 23, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kHttpGetConstMeta, + constMeta: kCrateApiApiHttpGetConstMeta, argValues: [url], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kHttpGetConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiHttpGetConstMeta => const TaskConstMeta( debugName: "http_get", argNames: ["url"], ); @override - Future> inDownloadChapterUuid( - {required String comicPathWord, dynamic hint}) { + Future> crateApiApiInDownloadChapterUuid( + {required String comicPathWord}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(comicPathWord, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 28, port: port_); + funcId: 24, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_list_String, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kInDownloadChapterUuidConstMeta, + constMeta: kCrateApiApiInDownloadChapterUuidConstMeta, argValues: [comicPathWord], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kInDownloadChapterUuidConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiInDownloadChapterUuidConstMeta => + const TaskConstMeta( debugName: "in_download_chapter_uuid", argNames: ["comicPathWord"], ); @override - Future init({required String root, dynamic hint}) { + Future crateApiApiInit({required String root}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(root, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1, port: port_); + funcId: 25, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: null, ), - constMeta: kInitConstMeta, + constMeta: kCrateApiApiInitConstMeta, argValues: [root], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kInitConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiInitConstMeta => const TaskConstMeta( debugName: "init", argNames: ["root"], ); @override - Future initLoginState({dynamic hint}) { + Future crateApiApiInitLoginState() { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 6, port: port_); + funcId: 26, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_login_state, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kInitLoginStateConstMeta, + constMeta: kCrateApiApiInitLoginStateConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kInitLoginStateConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiInitLoginStateConstMeta => const TaskConstMeta( debugName: "init_login_state", argNames: [], ); @override - Future listComicViewLogs( - {required int offset, required int limit, dynamic hint}) { + Future crateApiApiListComicViewLogs( + {required PlatformInt64 offset, required PlatformInt64 limit}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_i_64(offset, serializer); sse_encode_i_64(limit, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 21, port: port_); + funcId: 27, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_page_ui_view_log, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kListComicViewLogsConstMeta, + constMeta: kCrateApiApiListComicViewLogsConstMeta, argValues: [offset, limit], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kListComicViewLogsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiListComicViewLogsConstMeta => + const TaskConstMeta( debugName: "list_comic_view_logs", argNames: ["offset", "limit"], ); @override - Future loadProperty({required String k, dynamic hint}) { + Future crateApiApiLoadProperty({required String k}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(k, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 3, port: port_); + funcId: 28, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kLoadPropertyConstMeta, + constMeta: kCrateApiApiLoadPropertyConstMeta, argValues: [k], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kLoadPropertyConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiLoadPropertyConstMeta => const TaskConstMeta( debugName: "load_property", argNames: ["k"], ); @override - Future login( - {required String username, required String password, dynamic hint}) { + Future crateApiApiLogin( + {required String username, required String password}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(username, serializer); sse_encode_String(password, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 7, port: port_); + funcId: 29, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_login_state, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kLoginConstMeta, + constMeta: kCrateApiApiLoginConstMeta, argValues: [username, password], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kLoginConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiLoginConstMeta => const TaskConstMeta( debugName: "login", argNames: ["username", "password"], ); @override - Future rank( + Future crateApiApiRank( {required String dateType, - required int offset, - required int limit, - dynamic hint}) { + required BigInt offset, + required BigInt limit}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -1044,188 +1013,180 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_u_64(offset, serializer); sse_encode_u_64(limit, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 9, port: port_); + funcId: 30, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_page_rank_item, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kRankConstMeta, + constMeta: kCrateApiApiRankConstMeta, argValues: [dateType, offset, limit], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kRankConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiRankConstMeta => const TaskConstMeta( debugName: "rank", argNames: ["dateType", "offset", "limit"], ); @override - Future recommends( - {required int offset, required int limit, dynamic hint}) { + Future crateApiApiRecommends( + {required BigInt offset, required BigInt limit}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(offset, serializer); sse_encode_u_64(limit, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 10, port: port_); + funcId: 31, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_page_ui_comic_in_list, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kRecommendsConstMeta, + constMeta: kCrateApiApiRecommendsConstMeta, argValues: [offset, limit], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kRecommendsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiRecommendsConstMeta => const TaskConstMeta( debugName: "recommends", argNames: ["offset", "limit"], ); @override - Future register( - {required String username, required String password, dynamic hint}) { + Future crateApiApiRegister( + {required String username, required String password}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(username, serializer); sse_encode_String(password, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 8, port: port_); + funcId: 32, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_register_result, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kRegisterConstMeta, + constMeta: kCrateApiApiRegisterConstMeta, argValues: [username, password], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kRegisterConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiRegisterConstMeta => const TaskConstMeta( debugName: "register", argNames: ["username", "password"], ); @override - Future resetFailDownloads({dynamic hint}) { + Future crateApiApiResetFailDownloads() { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 29, port: port_); + funcId: 33, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kResetFailDownloadsConstMeta, + constMeta: kCrateApiApiResetFailDownloadsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kResetFailDownloadsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiResetFailDownloadsConstMeta => + const TaskConstMeta( debugName: "reset_fail_downloads", argNames: [], ); @override - Future saveProperty( - {required String k, required String v, dynamic hint}) { + Future crateApiApiSaveProperty({required String k, required String v}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(k, serializer); sse_encode_String(v, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 2, port: port_); + funcId: 34, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kSavePropertyConstMeta, + constMeta: kCrateApiApiSavePropertyConstMeta, argValues: [k, v], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kSavePropertyConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiSavePropertyConstMeta => const TaskConstMeta( debugName: "save_property", argNames: ["k", "v"], ); @override - Future setProxy({required String proxy, dynamic hint}) { + Future crateApiApiSetProxy({required String proxy}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(proxy, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 5, port: port_); + funcId: 35, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kSetProxyConstMeta, + constMeta: kCrateApiApiSetProxyConstMeta, argValues: [proxy], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kSetProxyConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiSetProxyConstMeta => const TaskConstMeta( debugName: "set_proxy", argNames: ["proxy"], ); @override - Future tags({dynamic hint}) { + Future crateApiApiTags() { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 15, port: port_); + funcId: 36, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_ui_tags, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kTagsConstMeta, + constMeta: kCrateApiApiTagsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kTagsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiTagsConstMeta => const TaskConstMeta( debugName: "tags", argNames: [], ); @override - Future viewChapterPage( + Future crateApiApiViewChapterPage( {required String comicPathWord, required String chapterUuid, required String chapterName, - required int chapterOrdered, - required int chapterSize, - required int chapterCount, - required int pageRank, - dynamic hint}) { + required PlatformInt64 chapterOrdered, + required PlatformInt64 chapterSize, + required PlatformInt64 chapterCount, + required int pageRank}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -1237,13 +1198,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_64(chapterCount, serializer); sse_encode_i_32(pageRank, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 19, port: port_); + funcId: 37, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kViewChapterPageConstMeta, + constMeta: kCrateApiApiViewChapterPageConstMeta, argValues: [ comicPathWord, chapterUuid, @@ -1254,11 +1215,10 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { pageRank ], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kViewChapterPageConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiViewChapterPageConstMeta => const TaskConstMeta( debugName: "view_chapter_page", argNames: [ "comicPathWord", @@ -1272,12 +1232,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future viewComicInfo( + Future crateApiApiViewComicInfo( {required String comicPathWord, required String comicName, required List comicAuthors, - required String comicCover, - dynamic hint}) { + required String comicCover}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); @@ -1286,24 +1245,69 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_list_author(comicAuthors, serializer); sse_encode_String(comicCover, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 18, port: port_); + funcId: 38, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kViewComicInfoConstMeta, + constMeta: kCrateApiApiViewComicInfoConstMeta, argValues: [comicPathWord, comicName, comicAuthors, comicCover], apiImpl: this, - hint: hint, )); } - TaskConstMeta get kViewComicInfoConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateApiApiViewComicInfoConstMeta => const TaskConstMeta( debugName: "view_comic_info", argNames: ["comicPathWord", "comicName", "comicAuthors", "comicCover"], ); + @override + String crateApiSimpleGreet({required String name}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_String(name, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 39)!; + }, + codec: SseCodec( + decodeSuccessData: sse_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiSimpleGreetConstMeta, + argValues: [name], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiSimpleGreetConstMeta => const TaskConstMeta( + debugName: "greet", + argNames: ["name"], + ); + + @override + Future crateApiSimpleInitApp() { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 40, port: port_); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiSimpleInitAppConstMeta, + argValues: [], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiSimpleInitAppConstMeta => const TaskConstMeta( + debugName: "init_app", + argNames: [], + ); + @protected AnyhowException dco_decode_AnyhowException(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -1342,7 +1346,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - int dco_decode_box_autoadd_i_64(dynamic raw) { + PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return dco_decode_i_64(raw); } @@ -1497,9 +1501,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - int dco_decode_i_64(dynamic raw) { + PlatformInt64 dco_decode_i_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeI64OrU64(raw); + return dcoDecodeI64(raw); } @protected @@ -1559,7 +1563,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected Int64List dco_decode_list_prim_i_64_strict(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return Int64List.from(raw); + return dcoDecodeInt64List(raw); } @protected @@ -1681,7 +1685,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { isAuthenticated: dco_decode_bool(arr[4]), datetimeCreated: dco_decode_String(arr[5]), bVerifyEmail: dco_decode_bool(arr[6]), - email: dco_decode_String(arr[7]), + email: dco_decode_opt_String(arr[7]), mobile: dco_decode_opt_String(arr[8]), mobileRegion: dco_decode_opt_String(arr[9]), point: dco_decode_i_64(arr[10]), @@ -1718,7 +1722,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - int? dco_decode_opt_box_autoadd_i_64(dynamic raw) { + PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return raw == null ? null : dco_decode_box_autoadd_i_64(raw); } @@ -1796,9 +1800,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - int dco_decode_u_64(dynamic raw) { + BigInt dco_decode_u_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeI64OrU64(raw); + return dcoDecodeU64(raw); } @protected @@ -2403,7 +2407,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - int sse_decode_box_autoadd_i_64(SseDeserializer deserializer) { + PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs return (sse_decode_i_64(deserializer)); } @@ -2563,9 +2567,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - int sse_decode_i_64(SseDeserializer deserializer) { + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getInt64(); + return deserializer.buffer.getPlatformInt64(); } @protected @@ -2850,7 +2854,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_isAuthenticated = sse_decode_bool(deserializer); var var_datetimeCreated = sse_decode_String(deserializer); var var_bVerifyEmail = sse_decode_bool(deserializer); - var var_email = sse_decode_String(deserializer); + var var_email = sse_decode_opt_String(deserializer); var var_mobile = sse_decode_opt_String(deserializer); var var_mobileRegion = sse_decode_opt_String(deserializer); var var_point = sse_decode_i_64(deserializer); @@ -2925,7 +2929,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - int? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer) { + PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs if (sse_decode_bool(deserializer)) { @@ -3029,9 +3033,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - int sse_decode_u_64(SseDeserializer deserializer) { + BigInt sse_decode_u_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint64(); + return deserializer.buffer.getBigUint64(); } @protected @@ -3750,7 +3754,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { void sse_encode_AnyhowException( AnyhowException self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - throw UnimplementedError('Unreachable ()'); + sse_encode_String(self.message, serializer); } @protected @@ -3780,7 +3784,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - void sse_encode_box_autoadd_i_64(int self, SseSerializer serializer) { + void sse_encode_box_autoadd_i_64( + PlatformInt64 self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_64(self, serializer); } @@ -3907,9 +3912,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - void sse_encode_i_64(int self, SseSerializer serializer) { + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putInt64(self); + serializer.buffer.putPlatformInt64(self); } @protected @@ -4137,7 +4142,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_bool(self.isAuthenticated, serializer); sse_encode_String(self.datetimeCreated, serializer); sse_encode_bool(self.bVerifyEmail, serializer); - sse_encode_String(self.email, serializer); + sse_encode_opt_String(self.email, serializer); sse_encode_opt_String(self.mobile, serializer); sse_encode_opt_String(self.mobileRegion, serializer); sse_encode_i_64(self.point, serializer); @@ -4182,7 +4187,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - void sse_encode_opt_box_autoadd_i_64(int? self, SseSerializer serializer) { + void sse_encode_opt_box_autoadd_i_64( + PlatformInt64? self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bool(self != null, serializer); @@ -4271,9 +4277,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } @protected - void sse_encode_u_64(int self, SseSerializer serializer) { + void sse_encode_u_64(BigInt self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint64(self); + serializer.buffer.putBigUint64(self); } @protected diff --git a/lib/src/rust/frb_generated.io.dart b/lib/src/rust/frb_generated.io.dart index c323482..d2b9501 100644 --- a/lib/src/rust/frb_generated.io.dart +++ b/lib/src/rust/frb_generated.io.dart @@ -1,9 +1,10 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.3.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 import 'api/api.dart'; +import 'api/simple.dart'; import 'copy_client/dtos.dart'; import 'dart:async'; import 'dart:convert'; @@ -36,7 +37,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse dco_decode_box_autoadd_browse(dynamic raw); @protected - int dco_decode_box_autoadd_i_64(dynamic raw); + PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw); @protected LastBrowse dco_decode_box_autoadd_last_browse(dynamic raw); @@ -82,7 +83,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int dco_decode_i_32(dynamic raw); @protected - int dco_decode_i_64(dynamic raw); + PlatformInt64 dco_decode_i_64(dynamic raw); @protected LastBrowse dco_decode_last_browse(dynamic raw); @@ -167,7 +168,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse? dco_decode_opt_box_autoadd_browse(dynamic raw); @protected - int? dco_decode_opt_box_autoadd_i_64(dynamic raw); + PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw); @protected LastBrowse? dco_decode_opt_box_autoadd_last_browse(dynamic raw); @@ -194,7 +195,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int dco_decode_u_32(dynamic raw); @protected - int dco_decode_u_64(dynamic raw); + BigInt dco_decode_u_64(dynamic raw); @protected int dco_decode_u_8(dynamic raw); @@ -304,7 +305,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse sse_decode_box_autoadd_browse(SseDeserializer deserializer); @protected - int sse_decode_box_autoadd_i_64(SseDeserializer deserializer); + PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer); @protected LastBrowse sse_decode_box_autoadd_last_browse(SseDeserializer deserializer); @@ -352,7 +353,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int sse_decode_i_32(SseDeserializer deserializer); @protected - int sse_decode_i_64(SseDeserializer deserializer); + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); @protected LastBrowse sse_decode_last_browse(SseDeserializer deserializer); @@ -446,7 +447,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse? sse_decode_opt_box_autoadd_browse(SseDeserializer deserializer); @protected - int? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer); + PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer); @protected LastBrowse? sse_decode_opt_box_autoadd_last_browse( @@ -477,7 +478,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int sse_decode_u_32(SseDeserializer deserializer); @protected - int sse_decode_u_64(SseDeserializer deserializer); + BigInt sse_decode_u_64(SseDeserializer deserializer); @protected int sse_decode_u_8(SseDeserializer deserializer); @@ -597,7 +598,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_browse(Browse self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_i_64(int self, SseSerializer serializer); + void sse_encode_box_autoadd_i_64( + PlatformInt64 self, SseSerializer serializer); @protected void sse_encode_box_autoadd_last_browse( @@ -650,7 +652,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_i_32(int self, SseSerializer serializer); @protected - void sse_encode_i_64(int self, SseSerializer serializer); + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); @protected void sse_encode_last_browse(LastBrowse self, SseSerializer serializer); @@ -748,7 +750,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_i_64(int? self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_i_64( + PlatformInt64? self, SseSerializer serializer); @protected void sse_encode_opt_box_autoadd_last_browse( @@ -781,7 +784,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_u_32(int self, SseSerializer serializer); @protected - void sse_encode_u_64(int self, SseSerializer serializer); + void sse_encode_u_64(BigInt self, SseSerializer serializer); @protected void sse_encode_u_8(int self, SseSerializer serializer); diff --git a/lib/src/rust/frb_generated.web.dart b/lib/src/rust/frb_generated.web.dart index 762984c..32a58dc 100644 --- a/lib/src/rust/frb_generated.web.dart +++ b/lib/src/rust/frb_generated.web.dart @@ -1,9 +1,13 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.3.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 +// Static analysis wrongly picks the IO variant, thus ignore this +// ignore_for_file: argument_type_not_assignable + import 'api/api.dart'; +import 'api/simple.dart'; import 'copy_client/dtos.dart'; import 'dart:async'; import 'dart:convert'; @@ -35,7 +39,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse dco_decode_box_autoadd_browse(dynamic raw); @protected - int dco_decode_box_autoadd_i_64(dynamic raw); + PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw); @protected LastBrowse dco_decode_box_autoadd_last_browse(dynamic raw); @@ -81,7 +85,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int dco_decode_i_32(dynamic raw); @protected - int dco_decode_i_64(dynamic raw); + PlatformInt64 dco_decode_i_64(dynamic raw); @protected LastBrowse dco_decode_last_browse(dynamic raw); @@ -166,7 +170,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse? dco_decode_opt_box_autoadd_browse(dynamic raw); @protected - int? dco_decode_opt_box_autoadd_i_64(dynamic raw); + PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw); @protected LastBrowse? dco_decode_opt_box_autoadd_last_browse(dynamic raw); @@ -193,7 +197,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int dco_decode_u_32(dynamic raw); @protected - int dco_decode_u_64(dynamic raw); + BigInt dco_decode_u_64(dynamic raw); @protected int dco_decode_u_8(dynamic raw); @@ -303,7 +307,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse sse_decode_box_autoadd_browse(SseDeserializer deserializer); @protected - int sse_decode_box_autoadd_i_64(SseDeserializer deserializer); + PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer); @protected LastBrowse sse_decode_box_autoadd_last_browse(SseDeserializer deserializer); @@ -351,7 +355,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int sse_decode_i_32(SseDeserializer deserializer); @protected - int sse_decode_i_64(SseDeserializer deserializer); + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); @protected LastBrowse sse_decode_last_browse(SseDeserializer deserializer); @@ -445,7 +449,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse? sse_decode_opt_box_autoadd_browse(SseDeserializer deserializer); @protected - int? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer); + PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer); @protected LastBrowse? sse_decode_opt_box_autoadd_last_browse( @@ -476,7 +480,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int sse_decode_u_32(SseDeserializer deserializer); @protected - int sse_decode_u_64(SseDeserializer deserializer); + BigInt sse_decode_u_64(SseDeserializer deserializer); @protected int sse_decode_u_8(SseDeserializer deserializer); @@ -596,7 +600,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_browse(Browse self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_i_64(int self, SseSerializer serializer); + void sse_encode_box_autoadd_i_64( + PlatformInt64 self, SseSerializer serializer); @protected void sse_encode_box_autoadd_last_browse( @@ -649,7 +654,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_i_32(int self, SseSerializer serializer); @protected - void sse_encode_i_64(int self, SseSerializer serializer); + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); @protected void sse_encode_last_browse(LastBrowse self, SseSerializer serializer); @@ -747,7 +752,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { Browse? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_i_64(int? self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_i_64( + PlatformInt64? self, SseSerializer serializer); @protected void sse_encode_opt_box_autoadd_last_browse( @@ -780,7 +786,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_u_32(int self, SseSerializer serializer); @protected - void sse_encode_u_64(int self, SseSerializer serializer); + void sse_encode_u_64(BigInt self, SseSerializer serializer); @protected void sse_encode_u_8(int self, SseSerializer serializer); @@ -902,10 +908,4 @@ external RustLibWasmModule get wasmModule; @JS() @anonymous -class RustLibWasmModule implements WasmModule { - @override - external Object /* Promise */ call([String? moduleName]); - - @override - external RustLibWasmModule bind(dynamic thisArg, String moduleName); -} +extension type RustLibWasmModule._(JSObject _) implements JSObject {} diff --git a/lib/src/rust/udto.dart b/lib/src/rust/udto.dart index 52e7a73..ff6e4df 100644 --- a/lib/src/rust/udto.dart +++ b/lib/src/rust/udto.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.3.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -16,7 +16,7 @@ enum ExportsType { class UICacheImage { final String absPath; final String cacheKey; - final int cacheTime; + final PlatformInt64 cacheTime; final String url; final String useful; final String? extendsFieldFirst; @@ -80,19 +80,19 @@ class UIChapterAndContents { final String comicId; final String comicPathWord; final List contents; - final int count; + final PlatformInt64 count; final String datetimeCreated; final String groupPathWord; - final int imgType; - final int index; + final PlatformInt64 imgType; + final PlatformInt64 index; final bool isLong; final String name; final String news; final String? next; - final int ordered; + final PlatformInt64 ordered; final String? prev; - final int size; - final int typeField; + final PlatformInt64 size; + final PlatformInt64 typeField; final String uuid; final Int64List words; @@ -211,18 +211,18 @@ class UIComic { final List author; final bool b404; final bool bHidden; - final int ban; + final PlatformInt64 ban; final String brief; final bool closeComment; final bool closeRoast; final String cover; final String datetimeUpdated; final ClassifyItem freeType; - final int imgType; + final PlatformInt64 imgType; final LastChapter lastChapter; final String name; final String pathWord; - final int popular; + final PlatformInt64 popular; final ClassifyItem reclass; final ClassifyItem region; final ClassifyItem restrict; @@ -324,18 +324,18 @@ class UIComic { class UIComicChapter { final String comicId; final String comicPathWord; - final int count; + final PlatformInt64 count; final String datetimeCreated; final String groupPathWord; - final int imgType; - final int index; + final PlatformInt64 imgType; + final PlatformInt64 index; final String name; final String news; final String? next; - final int ordered; + final PlatformInt64 ordered; final String? prev; - final int size; - final int typeField; + final PlatformInt64 size; + final PlatformInt64 typeField; final String uuid; const UIComicChapter({ @@ -403,7 +403,7 @@ class UIComicData { final bool isLogin; final bool isMobileBind; final bool isVip; - final int popular; + final PlatformInt64 popular; const UIComicData({ required this.comic, @@ -445,7 +445,7 @@ class UIComicInExplore { final ClassifyItem freeType; final List author; final String cover; - final int popular; + final PlatformInt64 popular; final String? datetimeUpdated; final List females; final List males; @@ -493,10 +493,10 @@ class UIComicInExplore { class UIComicInList { final List author; final String cover; - final int imgType; + final PlatformInt64 imgType; final String name; final String pathWord; - final int popular; + final PlatformInt64 popular; final List females; final List males; @@ -539,7 +539,7 @@ class UIComicInList { class UIComicQuery { final Browse? browse; - final int? collect; + final PlatformInt64? collect; final bool isLock; final bool isLogin; final bool isMobileBind; @@ -582,7 +582,7 @@ class UIDownloadComic { final String author; final bool b404; final bool bHidden; - final int ban; + final PlatformInt64 ban; final String brief; final bool closeComment; final bool closeRoast; @@ -590,10 +590,10 @@ class UIDownloadComic { final String datetimeUpdated; final String females; final String freeType; - final int imgType; + final PlatformInt64 imgType; final String males; final String name; - final int popular; + final PlatformInt64 popular; final String reclass; final String region; final String restrict; @@ -602,13 +602,13 @@ class UIDownloadComic { final String theme; final String uuid; final String coverCacheKey; - final int coverDownloadStatus; + final PlatformInt64 coverDownloadStatus; final String coverFormat; final int coverWidth; final int coverHeight; - final int imageCount; - final int imageCountSuccess; - final int downloadStatus; + final PlatformInt64 imageCount; + final PlatformInt64 imageCountSuccess; + final PlatformInt64 downloadStatus; const UIDownloadComic({ required this.pathWord, @@ -723,20 +723,20 @@ class UIDownloadComicChapter { final String comicPathWord; final String uuid; final String comicId; - final int count; + final PlatformInt64 count; final String datetimeCreated; final String groupPathWord; - final int imgType; - final int index; + final PlatformInt64 imgType; + final PlatformInt64 index; final bool isLong; final String name; final String news; final String? next; - final int ordered; + final PlatformInt64 ordered; final String? prev; - final int size; - final int typeField; - final int downloadStatus; + final PlatformInt64 size; + final PlatformInt64 typeField; + final PlatformInt64 downloadStatus; const UIDownloadComicChapter({ required this.comicPathWord, @@ -805,9 +805,9 @@ class UIDownloadComicChapter { class UIDownloadComicGroup { final String comicPathWord; final String groupPathWord; - final int count; + final PlatformInt64 count; final String name; - final int groupRank; + final PlatformInt64 groupRank; const UIDownloadComicGroup({ required this.comicPathWord, @@ -843,7 +843,7 @@ class UIDownloadComicPage { final int imageIndex; final String url; final String cacheKey; - final int downloadStatus; + final PlatformInt64 downloadStatus; final int width; final int height; final String format; @@ -889,7 +889,7 @@ class UIDownloadComicPage { } class UILoginState { - final int state; + final PlatformInt64 state; final String message; final MemberInfo? member; @@ -914,9 +914,9 @@ class UILoginState { class UIPageCollectedComic { final List list; - final int total; - final int limit; - final int offset; + final PlatformInt64 total; + final PlatformInt64 limit; + final PlatformInt64 offset; const UIPageCollectedComic({ required this.list, @@ -942,9 +942,9 @@ class UIPageCollectedComic { class UIPageComicChapter { final List list; - final int total; - final int limit; - final int offset; + final PlatformInt64 total; + final PlatformInt64 limit; + final PlatformInt64 offset; const UIPageComicChapter({ required this.list, @@ -970,9 +970,9 @@ class UIPageComicChapter { class UIPageComicInExplore { final List list; - final int total; - final int limit; - final int offset; + final PlatformInt64 total; + final PlatformInt64 limit; + final PlatformInt64 offset; const UIPageComicInExplore({ required this.list, @@ -998,9 +998,9 @@ class UIPageComicInExplore { class UIPageRankItem { final List list; - final int total; - final int limit; - final int offset; + final PlatformInt64 total; + final PlatformInt64 limit; + final PlatformInt64 offset; const UIPageRankItem({ required this.list, @@ -1026,9 +1026,9 @@ class UIPageRankItem { class UIPageUIComicInList { final List list; - final int total; - final int limit; - final int offset; + final PlatformInt64 total; + final PlatformInt64 limit; + final PlatformInt64 offset; const UIPageUIComicInList({ required this.list, @@ -1054,9 +1054,9 @@ class UIPageUIComicInList { class UIPageUIViewLog { final List list; - final int total; - final int limit; - final int offset; + final PlatformInt64 total; + final PlatformInt64 limit; + final PlatformInt64 offset; const UIPageUIViewLog({ required this.list, @@ -1086,7 +1086,7 @@ class UIQueryDownloadComic { final String author; final bool b404; final bool bHidden; - final int ban; + final PlatformInt64 ban; final String brief; final bool closeComment; final bool closeRoast; @@ -1094,10 +1094,10 @@ class UIQueryDownloadComic { final String datetimeUpdated; final String females; final String freeType; - final int imgType; + final PlatformInt64 imgType; final String males; final String name; - final int popular; + final PlatformInt64 popular; final String reclass; final String region; final String restrict1; @@ -1203,19 +1203,19 @@ class UIQueryDownloadComicChapter { final String comicPathWord; final String uuid; final String comicId; - final int count; + final PlatformInt64 count; final String datetimeCreated; final String groupPathWord; - final int imgType; - final int index; + final PlatformInt64 imgType; + final PlatformInt64 index; final bool isLong; final String name; final String news; final String? next; - final int ordered; + final PlatformInt64 ordered; final String? prev; - final int size; - final int typeField; + final PlatformInt64 size; + final PlatformInt64 typeField; const UIQueryDownloadComicChapter({ required this.comicPathWord, @@ -1281,9 +1281,9 @@ class UIQueryDownloadComicChapter { class UIQueryDownloadComicGroup { final String comicPathWord; final String groupPathWord; - final int count; + final PlatformInt64 count; final String name; - final int groupRank; + final PlatformInt64 groupRank; const UIQueryDownloadComicGroup({ required this.comicPathWord, @@ -1315,12 +1315,12 @@ class UIQueryDownloadComicGroup { class UIRankItem { final UIComicInList comic; - final int dateType; - final int popular; - final int riseNum; - final int riseSort; - final int sort; - final int sortLast; + final PlatformInt64 dateType; + final PlatformInt64 popular; + final PlatformInt64 riseNum; + final PlatformInt64 riseSort; + final PlatformInt64 sort; + final PlatformInt64 sortLast; const UIRankItem({ required this.comic, @@ -1357,7 +1357,7 @@ class UIRankItem { } class UIRegisterResult { - final int state; + final PlatformInt64 state; final String message; final RegisterResult? member; @@ -1405,8 +1405,8 @@ class UITags { } class UITheme { - final int count; - final int initials; + final PlatformInt64 count; + final PlatformInt64 initials; final String name; final String pathWord; @@ -1439,11 +1439,11 @@ class UIViewLog { final String comicCover; final String chapterUuid; final String chapterName; - final int chapterOrdered; - final int chapterSize; - final int chapterCount; + final PlatformInt64 chapterOrdered; + final PlatformInt64 chapterSize; + final PlatformInt64 chapterCount; final int pageRank; - final int viewTime; + final PlatformInt64 viewTime; const UIViewLog({ required this.comicPathWord, diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 0f55a80..404bead 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -25,4 +25,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 -COCOAPODS: 1.12.1 +COCOAPODS: 1.15.2 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index f1be0e1..c3e0c72 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -27,8 +27,8 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 5896CEA3497EFB8ADD7146A4 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F266CBD587B6D8A8FC0ACC99 /* Pods_RunnerTests.framework */; }; - DD7CE4FD2BF1C0E0001F6678 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CDB183D0C2CEA339D24A9DB /* Pods_Runner.framework */; }; + 6294DF3DE000D080A1CCC138 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6039AC431796EA71544135E /* Pods_RunnerTests.framework */; }; + B7402A50B1088A6C1A76A3D0 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F75182E66F957696801AB13 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -48,10 +48,21 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ - 1CDB183D0C2CEA339D24A9DB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2DBE5F6801E94A73B459E5E7 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - 304C4EAA91DC098C8FA48347 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 0C00ED589AF895ADAFC4977E /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; @@ -68,15 +79,15 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 3ACB2186A8A2C331681315F0 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 3F75182E66F957696801AB13 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 7F8575A62B4C7D03AA1D9F51 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 8BD0B52B125438B0F3BC76EB /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - C73D5CD964660FBD092E61D1 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - C9B372A9A917CBF8BCBBB0BD /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - DD7CE4FA2BF1C0D4001F6678 /* rust_lib_kobi.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = rust_lib_kobi.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DD7CE5002BF1C163001F6678 /* rust_lib_kobi.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = rust_lib_kobi.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F266CBD587B6D8A8FC0ACC99 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + ABF9A3CDE5C8442A49076C77 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + B3F29697B6EB00D10099C728 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + B6039AC431796EA71544135E /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C2787360BF87B6C508AEB9E7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + F5F5A55CF6E6EBF49DC9B748 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -84,7 +95,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5896CEA3497EFB8ADD7146A4 /* Pods_RunnerTests.framework in Frameworks */, + 6294DF3DE000D080A1CCC138 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -92,26 +103,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DD7CE4FD2BF1C0E0001F6678 /* Pods_Runner.framework in Frameworks */, + B7402A50B1088A6C1A76A3D0 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 14707F011119CD4E3D663F9F /* Pods */ = { - isa = PBXGroup; - children = ( - C9B372A9A917CBF8BCBBB0BD /* Pods-Runner.debug.xcconfig */, - 304C4EAA91DC098C8FA48347 /* Pods-Runner.release.xcconfig */, - C73D5CD964660FBD092E61D1 /* Pods-Runner.profile.xcconfig */, - 7F8575A62B4C7D03AA1D9F51 /* Pods-RunnerTests.debug.xcconfig */, - 2DBE5F6801E94A73B459E5E7 /* Pods-RunnerTests.release.xcconfig */, - 3ACB2186A8A2C331681315F0 /* Pods-RunnerTests.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; 331C80D6294CF71000263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( @@ -139,7 +137,7 @@ 331C80D6294CF71000263BE5 /* RunnerTests */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, - 14707F011119CD4E3D663F9F /* Pods */, + EAED550886567F887EA12C58 /* Pods */, ); sourceTree = ""; }; @@ -190,14 +188,26 @@ D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( - DD7CE5002BF1C163001F6678 /* rust_lib_kobi.framework */, - DD7CE4FA2BF1C0D4001F6678 /* rust_lib_kobi.framework */, - 1CDB183D0C2CEA339D24A9DB /* Pods_Runner.framework */, - F266CBD587B6D8A8FC0ACC99 /* Pods_RunnerTests.framework */, + 3F75182E66F957696801AB13 /* Pods_Runner.framework */, + B6039AC431796EA71544135E /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; }; + EAED550886567F887EA12C58 /* Pods */ = { + isa = PBXGroup; + children = ( + C2787360BF87B6C508AEB9E7 /* Pods-Runner.debug.xcconfig */, + ABF9A3CDE5C8442A49076C77 /* Pods-Runner.release.xcconfig */, + F5F5A55CF6E6EBF49DC9B748 /* Pods-Runner.profile.xcconfig */, + 8BD0B52B125438B0F3BC76EB /* Pods-RunnerTests.debug.xcconfig */, + B3F29697B6EB00D10099C728 /* Pods-RunnerTests.release.xcconfig */, + 0C00ED589AF895ADAFC4977E /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -205,7 +215,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - CF908DF19F23F9D34F31236D /* [CP] Check Pods Manifest.lock */, + F1CB43CB36CD0865E5BFA41B /* [CP] Check Pods Manifest.lock */, 331C80D1294CF70F00263BE5 /* Sources */, 331C80D2294CF70F00263BE5 /* Frameworks */, 331C80D3294CF70F00263BE5 /* Resources */, @@ -224,12 +234,13 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - BB89B5B9AC88D448BCB3FFD4 /* [CP] Check Pods Manifest.lock */, + 326EC6C380A67F35BCA6B591 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, - 840FEB536A0E90ED92E66BA0 /* [CP] Embed Pods Frameworks */, + 3E922DD4513A9B66681B06BF /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -312,6 +323,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 326EC6C380A67F35BCA6B591 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -350,7 +383,7 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - 840FEB536A0E90ED92E66BA0 /* [CP] Embed Pods Frameworks */ = { + 3E922DD4513A9B66681B06BF /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -367,29 +400,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - BB89B5B9AC88D448BCB3FFD4 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - CF908DF19F23F9D34F31236D /* [CP] Check Pods Manifest.lock */ = { + F1CB43CB36CD0865E5BFA41B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -462,7 +473,7 @@ /* Begin XCBuildConfiguration section */ 331C80DB294CF71000263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7F8575A62B4C7D03AA1D9F51 /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = 8BD0B52B125438B0F3BC76EB /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -477,7 +488,7 @@ }; 331C80DC294CF71000263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2DBE5F6801E94A73B459E5E7 /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = B3F29697B6EB00D10099C728 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -492,7 +503,7 @@ }; 331C80DD294CF71000263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3ACB2186A8A2C331681315F0 /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 0C00ED589AF895ADAFC4977E /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift index d53ef64..8e02df2 100644 --- a/macos/Runner/AppDelegate.swift +++ b/macos/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index 9f56413..78c36cf 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -8,5 +8,7 @@ com.apple.security.network.server + com.apple.security.network.client + diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index e89b7f3..08ba3a3 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -4,5 +4,7 @@ com.apple.security.app-sandbox + com.apple.security.network.client + diff --git a/macos/RunnerTests/RunnerTests.swift b/macos/RunnerTests/RunnerTests.swift index 5418c9f..61f3bd1 100644 --- a/macos/RunnerTests/RunnerTests.swift +++ b/macos/RunnerTests/RunnerTests.swift @@ -1,5 +1,5 @@ -import FlutterMacOS import Cocoa +import FlutterMacOS import XCTest class RunnerTests: XCTestCase { diff --git a/pubspec.lock b/pubspec.lock index 4feec6a..f8af320 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: "direct main" description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" csslib: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: "direct main" description: name: date_format - sha256: "8e5154ca363411847220c8cbc43afcf69c08e8debe40ba09d57710c25711760c" + sha256: a48254e60bdb7f1d5a15cac7f86e37491808056c0a99dbdc850841def4754ddc url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.0.9" event: dependency: "direct main" description: @@ -154,10 +154,10 @@ packages: dependency: "direct main" description: name: flutter_colorpicker - sha256: "458a6ed8ea480eb16ff892aedb4b7092b2804affd7e046591fb03127e8d8ef8b" + sha256: "969de5f6f9e2a570ac660fb7b501551451ea2a1ab9e2097e89475f60e07816ea" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.1.0" flutter_driver: dependency: transitive description: flutter @@ -175,10 +175,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_localizations: dependency: transitive description: flutter @@ -188,18 +188,10 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: d65dbdd271de6050d3204bab69a8ae25a291deb359403cd4f95a86055cab66c3 - url: "https://pub.dev" - source: hosted - version: "2.0.0-dev.32" - flutter_search_bar: - dependency: "direct main" - description: - name: flutter_search_bar - sha256: "6bc1d82c4caf04f40a9386833d5e2a8d947c89fee5c4c1e735957851677d1012" + sha256: b0271cc147d5afccf9774809e4eef52b7357babe1a1a31db649df6f02dd27580 url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "2.3.0" flutter_styled_toast: dependency: "direct main" description: @@ -248,50 +240,42 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" - url: "https://pub.dev" - source: hosted - version: "0.18.1" - js: - dependency: transitive - description: - name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.7.1" + version: "0.19.0" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" matcher: dependency: transitive description: @@ -304,18 +288,18 @@ 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" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" modal_bottom_sheet: dependency: "direct main" description: @@ -416,10 +400,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -524,10 +508,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -564,34 +548,34 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" url: "https://pub.dev" source: hosted - version: "6.2.6" + version: "6.3.0" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "360a6ed2027f18b73c8d98e159dda67a61b7f2e0f6ec26e86c3ada33b0621775" + sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab url: "https://pub.dev" source: hosted - version: "6.3.1" + version: "6.3.10" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89" + sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.2.0" url_launcher_macos: dependency: transitive description: @@ -612,26 +596,26 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" uuid: dependency: "direct main" description: name: uuid - sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" + sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.5.0" vector_math: dependency: transitive description: @@ -644,18 +628,18 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" web: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.0.0" webdriver: dependency: transitive description: @@ -673,5 +657,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.3.1 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.5.2 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index 62dce86..ce5583b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,19 +1,21 @@ name: kobi description: A comic reader. publish_to: 'none' + version: 1.0.0+1 environment: - sdk: '>=3.3.1 <4.0.0' + sdk: ^3.5.2 dependencies: flutter: sdk: flutter - cupertino_icons: ^1.0.6 + cupertino_icons: ^1.0.8 rust_lib_kobi: path: rust_builder - flutter_rust_bridge: 2.0.0-dev.32 + flutter_rust_bridge: 2.3.0 + date_format: ^2.0.5 uuid: ^4.1.0 awesome_select: ^5.2.0 @@ -25,7 +27,6 @@ dependencies: permission_handler: ^10.1.0 flutter_styled_toast: ^2.1.3 flutter_svg: ^1.0.3 - flutter_search_bar: ^3.0.0-dev.1 url_launcher: ^6.1.2 flutter_html: 3.0.0-alpha.3 flutter_colorpicker: ^1.0.3 @@ -37,8 +38,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - - flutter_lints: ^3.0.0 + flutter_lints: ^4.0.0 integration_test: sdk: flutter diff --git a/rust/Cargo.lock b/rust/Cargo.lock index dcee56c..e51e7d5 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "ahash" version = "0.8.11" @@ -53,9 +59,9 @@ checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" [[package]] name = "allo-isolate" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f5a5fd28223e6f3cafb7d9cd685f51eafdd71d33ca1229f8316925d5957240" +checksum = "97b6d794345b06592d0ebeed8e477e41b71e5a0a49df4fc0e4184d5938b99509" dependencies = [ "anyhow", "atomic", @@ -103,9 +109,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arbitrary" @@ -121,20 +127,20 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "async-compression" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c90a406b4495d129f00461241616194cb8a032c8d1c53c657f0961d5f8e0498" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "bzip2", "deflate64", @@ -167,18 +173,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -257,7 +263,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.1", "object", "rustc-demangle", ] @@ -294,15 +300,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitstream-io" -version = "2.3.0" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c12d1856e42f0d817a835fe55853957c85c8c8a470114029143d3f12671446e" +checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452" [[package]] name = "block-buffer" @@ -321,9 +327,9 @@ checksum = "832133bbabbbaa9fbdba793456a2827627a7d2b8fb96032fa1e7666d7895832b" [[package]] name = "built" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41bfbdb21256b87a8b5e80fab81a8eed158178e812fd7ba451907518b2742f16" +checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4" [[package]] name = "bumpalo" @@ -333,9 +339,9 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" [[package]] name = "byteorder" @@ -351,9 +357,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -414,7 +420,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets", ] [[package]] @@ -441,15 +447,15 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -471,9 +477,9 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -508,9 +514,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -549,9 +555,9 @@ dependencies = [ [[package]] name = "deflate64" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ace6c86376be0b6cdcf3fb41882e81d94b31587573d1cfa9d01cd06bba210d" +checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" [[package]] name = "delegate-attr" @@ -561,7 +567,7 @@ checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -605,9 +611,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] @@ -654,7 +660,7 @@ dependencies = [ "flume", "half", "lebe", - "miniz_oxide", + "miniz_oxide 0.7.1", "rayon-core", "smallvec", "zune-inflate", @@ -662,9 +668,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fdeflate" @@ -677,12 +683,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -698,9 +704,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.0.0-dev.32" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34014207992d96657886c50c90ab503bb4581cc9c2b1ea7ffad2ec12400032da" +checksum = "f13c1e57b460f7adbd6cbf8b4cd0a1d14238ed64f5cc2a6c2ccb7a605ac01354" dependencies = [ "allo-isolate", "android_logger", @@ -715,6 +721,7 @@ dependencies = [ "futures", "js-sys", "lazy_static", + "log", "oslog", "threadpool", "tokio", @@ -725,13 +732,15 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.0.0-dev.32" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd250246955bb9548a99733859946a5721289ec152de5fcc6eb03da7d3143dd1" +checksum = "16c85e62d6d34f5c1590af004ccd3dc45b1c726dba6721b632b164c19894fab4" dependencies = [ "hex", + "md-5", + "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -829,7 +838,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -945,9 +954,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -968,9 +977,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -978,12 +987,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", + "futures-util", "http", "http-body", "pin-project-lite", @@ -991,15 +1000,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -1016,26 +1025,27 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.26.0" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", "hyper", "hyper-util", - "rustls 0.22.4", + "rustls 0.23.12", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", + "webpki-roots 0.26.5", ] [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", "futures-channel", @@ -1086,12 +1096,12 @@ dependencies = [ [[package]] name = "image" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" +checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "color_quant", "exr", "gif", @@ -1109,12 +1119,12 @@ dependencies = [ [[package]] name = "image-webp" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d730b085583c4d789dfd07fdcf185be59501666a90c97c40162b37e4fdad272d" +checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904" dependencies = [ "byteorder-lite", - "thiserror", + "quick-error", ] [[package]] @@ -1125,9 +1135,9 @@ checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown", @@ -1141,7 +1151,7 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -1152,7 +1162,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -1178,9 +1188,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -1217,9 +1227,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libfuzzer-sys" @@ -1260,9 +1270,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -1307,7 +1317,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" dependencies = [ "cfg-if", - "rayon", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", ] [[package]] @@ -1344,15 +1363,25 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1389,9 +1418,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -1422,7 +1451,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -1532,7 +1561,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -1549,9 +1578,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1567,7 +1596,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets", ] [[package]] @@ -1608,7 +1637,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -1660,14 +1689,17 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.7.1", ] [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro-error" @@ -1695,9 +1727,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1718,14 +1750,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" dependencies = [ "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] name = "prost" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", @@ -1733,22 +1765,22 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9554e3ab233f0a932403704f1a1d08c30d5ccd931adfdfa1e8b5a19b52c1d55a" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] name = "prost-types" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] @@ -1768,11 +1800,59 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.12", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash", + "rustls 0.23.12", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1844,16 +1924,15 @@ dependencies = [ [[package]] name = "ravif" -version = "0.11.5" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc13288f5ab39e6d7c9d501759712e6969fcc9734220846fc9ed26cae2cc4234" +checksum = "a8f0bfd976333248de2078d350bfdf182ff96e168a24d23d2436cef320dd4bdd" dependencies = [ "avif-serialize", "imgref", "loop9", "quick-error", "rav1e", - "rayon", "rgb", ] @@ -1879,18 +1958,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -1900,9 +1979,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -1917,9 +1996,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", @@ -1938,8 +2017,9 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.22.4", - "rustls-pemfile 2.1.2", + "quinn", + "rustls 0.23.12", + "rustls-pemfile 2.1.3", "rustls-pki-types", "serde", "serde_json", @@ -1953,15 +2033,15 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.1", - "winreg", + "webpki-roots 0.26.5", + "windows-registry", ] [[package]] name = "rgb" -version = "0.8.37" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" dependencies = [ "bytemuck", ] @@ -2046,13 +2126,19 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2072,14 +2158,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ - "log", + "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.3", + "rustls-webpki 0.102.7", "subtle", "zeroize", ] @@ -2095,9 +2181,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64 0.22.1", "rustls-pki-types", @@ -2105,9 +2191,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -2121,9 +2207,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.3" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring", "rustls-pki-types", @@ -2162,7 +2248,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -2197,7 +2283,7 @@ dependencies = [ "proc-macro2", "quote", "sea-bae", - "syn 2.0.63", + "syn 2.0.77", "unicode-ident", ] @@ -2224,31 +2310,32 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.201" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.201" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2265,9 +2352,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -2390,11 +2477,10 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" dependencies = [ - "itertools", "nom", "unicode_categories", ] @@ -2525,9 +2611,9 @@ checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2542,9 +2628,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.63" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -2553,9 +2639,12 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-deps" @@ -2572,40 +2661,41 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -2640,9 +2730,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2655,50 +2745,49 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] name = "tokio-rustls" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.22.4", + "rustls 0.23.12", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-socks" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" +checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" dependencies = [ "either", "futures-util", @@ -2719,9 +2808,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -2733,9 +2822,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -2745,18 +2834,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", @@ -2778,20 +2867,19 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -2813,7 +2901,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] @@ -2904,9 +2992,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2990,7 +3078,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", "wasm-bindgen-shared", ] @@ -3024,7 +3112,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3053,9 +3141,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" dependencies = [ "rustls-pki-types", ] @@ -3094,167 +3182,130 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-targets 0.48.5", + "windows-result", + "windows-strings", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.52.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-result", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.52.5" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows-targets", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" +name = "windows-targets" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +name = "windows_aarch64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "xz2" version = "0.1.7" @@ -3266,53 +3317,54 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.77", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", @@ -3335,9 +3387,9 @@ dependencies = [ [[package]] name = "zune-jpeg" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448" +checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768" dependencies = [ "zune-core", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index f4497ff..1ed9a94 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" crate-type = ["cdylib", "staticlib"] [dependencies] -flutter_rust_bridge = "=2.0.0-dev.32" +flutter_rust_bridge = "=2.3.0" anyhow = "1.0.81" async_once = "0.2.6" base64 = "0.22.0" @@ -40,4 +40,3 @@ tracing = "0.1.40" rand = "0.8.5" async_zip = { version = "0.0.16", features = ["full", "tokio-util", "tokio", "tokio-fs", "async-compression"] } async-trait = "0.1.79" - diff --git a/rust/src/api/mod.rs b/rust/src/api/mod.rs index c860c33..eeee64c 100644 --- a/rust/src/api/mod.rs +++ b/rust/src/api/mod.rs @@ -3,3 +3,4 @@ // pub mod api; +pub mod simple; diff --git a/rust/src/api/simple.rs b/rust/src/api/simple.rs new file mode 100644 index 0000000..4360c82 --- /dev/null +++ b/rust/src/api/simple.rs @@ -0,0 +1,10 @@ +#[flutter_rust_bridge::frb(sync)] // Synchronous mode for simplicity of the demo +pub fn greet(name: String) -> String { + format!("Hello, {name}!") +} + +#[flutter_rust_bridge::frb(init)] +pub fn init_app() { + // Default utilities - feel free to customize + flutter_rust_bridge::setup_default_user_utils(); +} diff --git a/rust/src/copy_client/dtos.rs b/rust/src/copy_client/dtos.rs index 6852cbe..b1d7f5f 100644 --- a/rust/src/copy_client/dtos.rs +++ b/rust/src/copy_client/dtos.rs @@ -280,27 +280,38 @@ pub struct LoginResult { pub username: String, pub nickname: String, pub avatar: String, + #[serde(default)] pub is_authenticated: bool, pub datetime_created: String, + #[serde(default)] pub b_verify_email: bool, - pub email: String, + pub email: Option, pub mobile: Option, pub mobile_region: Option, + #[serde(default)] pub point: i64, + #[serde(default)] pub comic_vip: i64, pub comic_vip_end: Option, pub comic_vip_start: Option, + #[serde(default)] pub cartoon_vip: i64, pub cartoon_vip_end: Option, pub cartoon_vip_start: Option, pub ads_vip_end: Option, + #[serde(default)] pub close_report: bool, + #[serde(default)] pub downloads: i64, + #[serde(default)] pub vip_downloads: i64, + #[serde(default)] pub reward_downloads: i64, pub invite_code: Option, pub invited: Option, + #[serde(default)] pub b_sstv: bool, + #[serde(default)] pub scy_answer: bool, } @@ -310,29 +321,41 @@ pub struct MemberInfo { pub username: String, pub nickname: String, pub avatar: String, + #[serde(default)] pub is_authenticated: bool, pub datetime_created: String, + #[serde(default)] pub b_verify_email: bool, - pub email: String, + pub email: Option, pub mobile: Option, pub mobile_region: Option, + #[serde(default)] pub point: i64, + #[serde(default)] pub comic_vip: i64, pub comic_vip_end: Option, pub comic_vip_start: Option, + #[serde(default)] pub cartoon_vip: i64, pub cartoon_vip_end: Option, pub cartoon_vip_start: Option, pub ads_vip_end: Option, + #[serde(default)] pub close_report: bool, + #[serde(default)] pub downloads: i64, + #[serde(default)] pub vip_downloads: i64, + #[serde(default)] pub reward_downloads: i64, pub invite_code: Option, pub invited: Option, + #[serde(default)] pub b_sstv: bool, + #[serde(default)] pub scy_answer: bool, pub day_downloads_refresh: String, + #[serde(default)] pub day_downloads: i64, } diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs deleted file mode 100644 index ba5ec84..0000000 --- a/rust/src/frb_generated.io.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. - -// Section: imports - -use super::*; -use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; -use flutter_rust_bridge::{Handler, IntoIntoDart}; - -// Section: boilerplate - -flutter_rust_bridge::frb_generated_boilerplate_io!(); diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 43de357..aa97db3 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.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.3.0. #![allow( non_camel_case_types, @@ -14,13 +14,19 @@ clippy::double_parens, clippy::let_and_return, clippy::too_many_arguments, - clippy::match_single_binding + clippy::match_single_binding, + clippy::clone_on_copy, + clippy::let_unit_value, + clippy::deref_addrof, + clippy::explicit_auto_deref, + clippy::borrow_deref_ref, + clippy::needless_borrow )] // Section: imports use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; +use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate @@ -30,8 +36,8 @@ 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.0.0-dev.32"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1861589029; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.3.0"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1083111246; // Section: executor @@ -39,7 +45,7 @@ flutter_rust_bridge::frb_generated_default_handler!(); // Section: wire_funcs -fn wire_append_download_impl( +fn wire__crate__api__api__append_download_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -64,12 +70,17 @@ fn wire_append_download_impl( let api_data = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || crate::api::api::append_download(api_data))()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::append_download(api_data)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_cache_image_impl( +fn wire__crate__api__api__cache_image_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -99,21 +110,24 @@ fn wire_cache_image_impl( let api_extends_field_third = >::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::cache_image( - api_cache_key, - api_url, - api_useful, - api_extends_field_first, - api_extends_field_second, - api_extends_field_third, - ) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::cache_image( + api_cache_key, + api_url, + api_useful, + api_extends_field_first, + api_extends_field_second, + api_extends_field_third, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_clean_cache_impl( +fn wire__crate__api__api__clean_cache_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -137,11 +151,18 @@ fn wire_clean_cache_impl( flutter_rust_bridge::for_generated::SseDeserializer::new(message); let api_time = ::sse_decode(&mut deserializer); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::clean_cache(api_time))()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::clean_cache(api_time)?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_collect_from_account_impl( +fn wire__crate__api__api__collect_from_account_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -169,19 +190,22 @@ fn wire_collect_from_account_impl( let api_limit = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::collect_from_account( - api_free_type, - api_ordering, - api_offset, - api_limit, - ) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::collect_from_account( + api_free_type, + api_ordering, + api_offset, + api_limit, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_collect_to_account_impl( +fn wire__crate__api__api__collect_to_account_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -208,18 +232,21 @@ fn wire_collect_to_account_impl( let api_comic_path_word = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::collect_to_account( - api_comic_id, - api_is_collect, - api_comic_path_word, - ) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::collect_to_account( + api_comic_id, + api_is_collect, + api_comic_path_word, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_comic_impl( +fn wire__crate__api__api__comic_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -243,11 +270,18 @@ fn wire_comic_impl( flutter_rust_bridge::for_generated::SseDeserializer::new(message); let api_path_word = ::sse_decode(&mut deserializer); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::comic(api_path_word))()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::comic(api_path_word)?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_comic_chapter_data_impl( +fn wire__crate__api__api__comic_chapter_data_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -273,14 +307,20 @@ fn wire_comic_chapter_data_impl( let api_chapter_uuid = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::comic_chapter_data(api_comic_path_word, api_chapter_uuid) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::comic_chapter_data( + api_comic_path_word, + api_chapter_uuid, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_comic_chapters_impl( +fn wire__crate__api__api__comic_chapters_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -308,19 +348,22 @@ fn wire_comic_chapters_impl( let api_offset = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::comic_chapters( - api_comic_path_word, - api_group_path_word, - api_limit, - api_offset, - ) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::comic_chapters( + api_comic_path_word, + api_group_path_word, + api_limit, + api_offset, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_comic_query_impl( +fn wire__crate__api__api__comic_query_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -345,12 +388,17 @@ fn wire_comic_query_impl( let api_path_word = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || crate::api::api::comic_query(api_path_word))()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::comic_query(api_path_word)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_comic_search_impl( +fn wire__crate__api__api__comic_search_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -378,14 +426,19 @@ fn wire_comic_search_impl( let api_limit = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::comic_search(api_q_type, api_q, api_offset, api_limit) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::comic_search( + api_q_type, api_q, api_offset, api_limit, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_delete_download_comic_impl( +fn wire__crate__api__api__delete_download_comic_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -410,14 +463,18 @@ fn wire_delete_download_comic_impl( let api_comic_path_word = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::delete_download_comic(api_comic_path_word) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = + crate::api::api::delete_download_comic(api_comic_path_word)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_desktop_root_impl( +fn wire__crate__api__api__desktop_root_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -440,11 +497,18 @@ fn wire_desktop_root_impl( let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::desktop_root())()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::desktop_root()?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_download_comic_chapters_impl( +fn wire__crate__api__api__download_comic_chapters_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -469,14 +533,18 @@ fn wire_download_comic_chapters_impl( let api_comic_path_word = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::download_comic_chapters(api_comic_path_word) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = + crate::api::api::download_comic_chapters(api_comic_path_word)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_download_comic_groups_impl( +fn wire__crate__api__api__download_comic_groups_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -501,14 +569,18 @@ fn wire_download_comic_groups_impl( let api_comic_path_word = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::download_comic_groups(api_comic_path_word) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = + crate::api::api::download_comic_groups(api_comic_path_word)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_download_comic_pages_impl( +fn wire__crate__api__api__download_comic_pages_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -534,14 +606,20 @@ fn wire_download_comic_pages_impl( let api_chapter_uuid = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::download_comic_pages(api_comic_path_word, api_chapter_uuid) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::download_comic_pages( + api_comic_path_word, + api_chapter_uuid, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_download_comics_impl( +fn wire__crate__api__api__download_comics_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -564,11 +642,18 @@ fn wire_download_comics_impl( let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::download_comics())()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::download_comics()?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_download_is_pause_impl( +fn wire__crate__api__api__download_is_pause_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -591,11 +676,18 @@ fn wire_download_is_pause_impl( let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::download_is_pause())()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::download_is_pause()?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_download_set_pause_impl( +fn wire__crate__api__api__download_set_pause_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -620,12 +712,17 @@ fn wire_download_set_pause_impl( let api_pause = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || crate::api::api::download_set_pause(api_pause))()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::download_set_pause(api_pause)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_explorer_impl( +fn wire__crate__api__api__explorer_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -654,20 +751,23 @@ fn wire_explorer_impl( let api_limit = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::explorer( - api_ordering, - api_top, - api_theme, - api_offset, - api_limit, - ) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::explorer( + api_ordering, + api_top, + api_theme, + api_offset, + api_limit, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_exports_impl( +fn wire__crate__api__api__exports_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -694,14 +794,21 @@ fn wire_exports_impl( let api_exports_type = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::exports(api_uuid_list, api_export_to_folder, api_exports_type) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::exports( + api_uuid_list, + api_export_to_folder, + api_exports_type, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_find_comic_view_log_impl( +fn wire__crate__api__api__find_comic_view_log_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -726,14 +833,17 @@ fn wire_find_comic_view_log_impl( let api_path_word = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::find_comic_view_log(api_path_word) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::find_comic_view_log(api_path_word)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_get_proxy_impl( +fn wire__crate__api__api__get_proxy_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -756,11 +866,18 @@ fn wire_get_proxy_impl( let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::get_proxy())()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::get_proxy()?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_http_get_impl( +fn wire__crate__api__api__http_get_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -784,11 +901,18 @@ fn wire_http_get_impl( flutter_rust_bridge::for_generated::SseDeserializer::new(message); let api_url = ::sse_decode(&mut deserializer); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::http_get(api_url))()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::http_get(api_url)?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_in_download_chapter_uuid_impl( +fn wire__crate__api__api__in_download_chapter_uuid_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -813,14 +937,18 @@ fn wire_in_download_chapter_uuid_impl( let api_comic_path_word = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::in_download_chapter_uuid(api_comic_path_word) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = + crate::api::api::in_download_chapter_uuid(api_comic_path_word)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_init_impl( +fn wire__crate__api__api__init_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -845,14 +973,17 @@ fn wire_init_impl( let api_root = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - Result::<_, ()>::Ok(crate::api::api::init(api_root)) + transform_result_sse::<_, ()>((move || { + let output_ok = Result::<_, ()>::Ok({ + crate::api::api::init(api_root); + })?; + Ok(output_ok) })()) } }, ) } -fn wire_init_login_state_impl( +fn wire__crate__api__api__init_login_state_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -875,11 +1006,18 @@ fn wire_init_login_state_impl( let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::init_login_state())()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::init_login_state()?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_list_comic_view_logs_impl( +fn wire__crate__api__api__list_comic_view_logs_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -905,14 +1043,18 @@ fn wire_list_comic_view_logs_impl( let api_limit = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::list_comic_view_logs(api_offset, api_limit) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = + crate::api::api::list_comic_view_logs(api_offset, api_limit)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_load_property_impl( +fn wire__crate__api__api__load_property_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -936,11 +1078,18 @@ fn wire_load_property_impl( flutter_rust_bridge::for_generated::SseDeserializer::new(message); let api_k = ::sse_decode(&mut deserializer); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::load_property(api_k))()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::load_property(api_k)?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_login_impl( +fn wire__crate__api__api__login_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -966,12 +1115,17 @@ fn wire_login_impl( let api_password = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || crate::api::api::login(api_username, api_password))()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::login(api_username, api_password)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_rank_impl( +fn wire__crate__api__api__rank_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -998,14 +1152,18 @@ fn wire_rank_impl( let api_limit = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::rank(api_date_type, api_offset, api_limit) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = + crate::api::api::rank(api_date_type, api_offset, api_limit)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_recommends_impl( +fn wire__crate__api__api__recommends_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -1031,12 +1189,17 @@ fn wire_recommends_impl( let api_limit = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || crate::api::api::recommends(api_offset, api_limit))()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::recommends(api_offset, api_limit)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_register_impl( +fn wire__crate__api__api__register_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -1062,14 +1225,17 @@ fn wire_register_impl( let api_password = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::register(api_username, api_password) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::register(api_username, api_password)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_reset_fail_downloads_impl( +fn wire__crate__api__api__reset_fail_downloads_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -1092,11 +1258,18 @@ fn wire_reset_fail_downloads_impl( let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::reset_fail_downloads())()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::reset_fail_downloads()?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_save_property_impl( +fn wire__crate__api__api__save_property_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -1122,12 +1295,17 @@ fn wire_save_property_impl( let api_v = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || crate::api::api::save_property(api_k, api_v))()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::save_property(api_k, api_v)?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_set_proxy_impl( +fn wire__crate__api__api__set_proxy_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -1151,11 +1329,18 @@ fn wire_set_proxy_impl( flutter_rust_bridge::for_generated::SseDeserializer::new(message); let api_proxy = ::sse_decode(&mut deserializer); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::set_proxy(api_proxy))()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::set_proxy(api_proxy)?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_tags_impl( +fn wire__crate__api__api__tags_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -1178,11 +1363,18 @@ fn wire_tags_impl( let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); deserializer.end(); - move |context| transform_result_sse((move || crate::api::api::tags())()) + move |context| { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::tags()?; + Ok(output_ok) + })(), + ) + } }, ) } -fn wire_view_chapter_page_impl( +fn wire__crate__api__api__view_chapter_page_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -1213,22 +1405,25 @@ fn wire_view_chapter_page_impl( let api_page_rank = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::view_chapter_page( - api_comic_path_word, - api_chapter_uuid, - api_chapter_name, - api_chapter_ordered, - api_chapter_size, - api_chapter_count, - api_page_rank, - ) - })()) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::view_chapter_page( + api_comic_path_word, + api_chapter_uuid, + api_chapter_name, + api_chapter_ordered, + api_chapter_size, + api_chapter_count, + api_page_rank, + )?; + Ok(output_ok) + })(), + ) } }, ) } -fn wire_view_comic_info_impl( +fn wire__crate__api__api__view_comic_info_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -1257,13 +1452,80 @@ fn wire_view_comic_info_impl( let api_comic_cover = ::sse_decode(&mut deserializer); deserializer.end(); move |context| { - transform_result_sse((move || { - crate::api::api::view_comic_info( - api_comic_path_word, - api_comic_name, - api_comic_authors, - api_comic_cover, - ) + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::api::api::view_comic_info( + api_comic_path_word, + api_comic_name, + api_comic_authors, + api_comic_cover, + )?; + Ok(output_ok) + })(), + ) + } + }, + ) +} +fn wire__crate__api__simple__greet_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "greet", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_name = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::simple::greet(api_name))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__simple__init_app_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "init_app", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + deserializer.end(); + move |context| { + transform_result_sse::<_, ()>((move || { + let output_ok = Result::<_, ()>::Ok({ + crate::api::simple::init_app(); + })?; + Ok(output_ok) })()) } }, @@ -1275,7 +1537,8 @@ fn wire_view_comic_info_impl( impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - unreachable!(""); + let mut inner = ::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::anyhow::anyhow!("{}", inner); } } @@ -1764,7 +2027,7 @@ impl SseDecode for crate::copy_client::dtos::MemberInfo { let mut var_isAuthenticated = ::sse_decode(deserializer); let mut var_datetimeCreated = ::sse_decode(deserializer); let mut var_bVerifyEmail = ::sse_decode(deserializer); - let mut var_email = ::sse_decode(deserializer); + let mut var_email = >::sse_decode(deserializer); let mut var_mobile = >::sse_decode(deserializer); let mut var_mobileRegion = >::sse_decode(deserializer); let mut var_point = ::sse_decode(deserializer); @@ -2764,44 +3027,49 @@ fn pde_ffi_dispatcher_primary_impl( ) { // Codec=Pde (Serialization + dispatch), see doc to use other codecs match func_id { - 27 => wire_append_download_impl(port, ptr, rust_vec_len, data_len), - 24 => wire_cache_image_impl(port, ptr, rust_vec_len, data_len), - 25 => wire_clean_cache_impl(port, ptr, rust_vec_len, data_len), - 23 => wire_collect_from_account_impl(port, ptr, rust_vec_len, data_len), - 22 => wire_collect_to_account_impl(port, ptr, rust_vec_len, data_len), - 11 => wire_comic_impl(port, ptr, rust_vec_len, data_len), - 14 => wire_comic_chapter_data_impl(port, ptr, rust_vec_len, data_len), - 12 => wire_comic_chapters_impl(port, ptr, rust_vec_len, data_len), - 13 => wire_comic_query_impl(port, ptr, rust_vec_len, data_len), - 17 => wire_comic_search_impl(port, ptr, rust_vec_len, data_len), - 26 => wire_delete_download_comic_impl(port, ptr, rust_vec_len, data_len), - 37 => wire_desktop_root_impl(port, ptr, rust_vec_len, data_len), - 32 => wire_download_comic_chapters_impl(port, ptr, rust_vec_len, data_len), - 31 => wire_download_comic_groups_impl(port, ptr, rust_vec_len, data_len), - 33 => wire_download_comic_pages_impl(port, ptr, rust_vec_len, data_len), - 30 => wire_download_comics_impl(port, ptr, rust_vec_len, data_len), - 34 => wire_download_is_pause_impl(port, ptr, rust_vec_len, data_len), - 35 => wire_download_set_pause_impl(port, ptr, rust_vec_len, data_len), - 16 => wire_explorer_impl(port, ptr, rust_vec_len, data_len), - 38 => wire_exports_impl(port, ptr, rust_vec_len, data_len), - 20 => wire_find_comic_view_log_impl(port, ptr, rust_vec_len, data_len), - 4 => wire_get_proxy_impl(port, ptr, rust_vec_len, data_len), - 36 => wire_http_get_impl(port, ptr, rust_vec_len, data_len), - 28 => wire_in_download_chapter_uuid_impl(port, ptr, rust_vec_len, data_len), - 1 => wire_init_impl(port, ptr, rust_vec_len, data_len), - 6 => wire_init_login_state_impl(port, ptr, rust_vec_len, data_len), - 21 => wire_list_comic_view_logs_impl(port, ptr, rust_vec_len, data_len), - 3 => wire_load_property_impl(port, ptr, rust_vec_len, data_len), - 7 => wire_login_impl(port, ptr, rust_vec_len, data_len), - 9 => wire_rank_impl(port, ptr, rust_vec_len, data_len), - 10 => wire_recommends_impl(port, ptr, rust_vec_len, data_len), - 8 => wire_register_impl(port, ptr, rust_vec_len, data_len), - 29 => wire_reset_fail_downloads_impl(port, ptr, rust_vec_len, data_len), - 2 => wire_save_property_impl(port, ptr, rust_vec_len, data_len), - 5 => wire_set_proxy_impl(port, ptr, rust_vec_len, data_len), - 15 => wire_tags_impl(port, ptr, rust_vec_len, data_len), - 19 => wire_view_chapter_page_impl(port, ptr, rust_vec_len, data_len), - 18 => wire_view_comic_info_impl(port, ptr, rust_vec_len, data_len), + 1 => wire__crate__api__api__append_download_impl(port, ptr, rust_vec_len, data_len), + 2 => wire__crate__api__api__cache_image_impl(port, ptr, rust_vec_len, data_len), + 3 => wire__crate__api__api__clean_cache_impl(port, ptr, rust_vec_len, data_len), + 4 => wire__crate__api__api__collect_from_account_impl(port, ptr, rust_vec_len, data_len), + 5 => wire__crate__api__api__collect_to_account_impl(port, ptr, rust_vec_len, data_len), + 6 => wire__crate__api__api__comic_impl(port, ptr, rust_vec_len, data_len), + 7 => wire__crate__api__api__comic_chapter_data_impl(port, ptr, rust_vec_len, data_len), + 8 => wire__crate__api__api__comic_chapters_impl(port, ptr, rust_vec_len, data_len), + 9 => wire__crate__api__api__comic_query_impl(port, ptr, rust_vec_len, data_len), + 10 => wire__crate__api__api__comic_search_impl(port, ptr, rust_vec_len, data_len), + 11 => wire__crate__api__api__delete_download_comic_impl(port, ptr, rust_vec_len, data_len), + 12 => wire__crate__api__api__desktop_root_impl(port, ptr, rust_vec_len, data_len), + 13 => { + wire__crate__api__api__download_comic_chapters_impl(port, ptr, rust_vec_len, data_len) + } + 14 => wire__crate__api__api__download_comic_groups_impl(port, ptr, rust_vec_len, data_len), + 15 => wire__crate__api__api__download_comic_pages_impl(port, ptr, rust_vec_len, data_len), + 16 => wire__crate__api__api__download_comics_impl(port, ptr, rust_vec_len, data_len), + 17 => wire__crate__api__api__download_is_pause_impl(port, ptr, rust_vec_len, data_len), + 18 => wire__crate__api__api__download_set_pause_impl(port, ptr, rust_vec_len, data_len), + 19 => wire__crate__api__api__explorer_impl(port, ptr, rust_vec_len, data_len), + 20 => wire__crate__api__api__exports_impl(port, ptr, rust_vec_len, data_len), + 21 => wire__crate__api__api__find_comic_view_log_impl(port, ptr, rust_vec_len, data_len), + 22 => wire__crate__api__api__get_proxy_impl(port, ptr, rust_vec_len, data_len), + 23 => wire__crate__api__api__http_get_impl(port, ptr, rust_vec_len, data_len), + 24 => { + wire__crate__api__api__in_download_chapter_uuid_impl(port, ptr, rust_vec_len, data_len) + } + 25 => wire__crate__api__api__init_impl(port, ptr, rust_vec_len, data_len), + 26 => wire__crate__api__api__init_login_state_impl(port, ptr, rust_vec_len, data_len), + 27 => wire__crate__api__api__list_comic_view_logs_impl(port, ptr, rust_vec_len, data_len), + 28 => wire__crate__api__api__load_property_impl(port, ptr, rust_vec_len, data_len), + 29 => wire__crate__api__api__login_impl(port, ptr, rust_vec_len, data_len), + 30 => wire__crate__api__api__rank_impl(port, ptr, rust_vec_len, data_len), + 31 => wire__crate__api__api__recommends_impl(port, ptr, rust_vec_len, data_len), + 32 => wire__crate__api__api__register_impl(port, ptr, rust_vec_len, data_len), + 33 => wire__crate__api__api__reset_fail_downloads_impl(port, ptr, rust_vec_len, data_len), + 34 => wire__crate__api__api__save_property_impl(port, ptr, rust_vec_len, data_len), + 35 => wire__crate__api__api__set_proxy_impl(port, ptr, rust_vec_len, data_len), + 36 => wire__crate__api__api__tags_impl(port, ptr, rust_vec_len, data_len), + 37 => wire__crate__api__api__view_chapter_page_impl(port, ptr, rust_vec_len, data_len), + 38 => wire__crate__api__api__view_comic_info_impl(port, ptr, rust_vec_len, data_len), + 40 => wire__crate__api__simple__init_app_impl(port, ptr, rust_vec_len, data_len), _ => unreachable!(), } } @@ -2814,6 +3082,7 @@ fn pde_ffi_dispatcher_sync_impl( ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { // Codec=Pde (Serialization + dispatch), see doc to use other codecs match func_id { + 39 => wire__crate__api__simple__greet_impl(ptr, rust_vec_len, data_len), _ => unreachable!(), } } @@ -2992,6 +3261,7 @@ impl flutter_rust_bridge::IntoDart for crate::udto::ExportsType { match self { Self::Folder => 0.into_dart(), Self::Zip => 1.into_dart(), + _ => unreachable!(), } } } @@ -4284,7 +4554,7 @@ impl SseEncode for crate::copy_client::dtos::MemberInfo { ::sse_encode(self.is_authenticated, serializer); ::sse_encode(self.datetime_created, serializer); ::sse_encode(self.b_verify_email, serializer); - ::sse_encode(self.email, serializer); + >::sse_encode(self.email, serializer); >::sse_encode(self.mobile, serializer); >::sse_encode(self.mobile_region, serializer); ::sse_encode(self.point, serializer); @@ -4875,14 +5145,46 @@ impl SseEncode for () { } #[cfg(not(target_family = "wasm"))] -#[path = "frb_generated.io.rs"] -mod io; +mod io { + // This file is automatically generated, so please do not edit it. + // Generated by `flutter_rust_bridge`@ 2.3.0. + + // Section: imports + + use super::*; + use flutter_rust_bridge::for_generated::byteorder::{ + NativeEndian, ReadBytesExt, WriteBytesExt, + }; + use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; + use flutter_rust_bridge::{Handler, IntoIntoDart}; + + // Section: boilerplate + + flutter_rust_bridge::frb_generated_boilerplate_io!(); +} #[cfg(not(target_family = "wasm"))] pub use io::*; /// cbindgen:ignore #[cfg(target_family = "wasm")] -#[path = "frb_generated.web.rs"] -mod web; +mod web { + // This file is automatically generated, so please do not edit it. + // Generated by `flutter_rust_bridge`@ 2.3.0. + + // Section: imports + + use super::*; + use flutter_rust_bridge::for_generated::byteorder::{ + NativeEndian, ReadBytesExt, WriteBytesExt, + }; + use flutter_rust_bridge::for_generated::wasm_bindgen; + use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*; + use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; + use flutter_rust_bridge::{Handler, IntoIntoDart}; + + // Section: boilerplate + + flutter_rust_bridge::frb_generated_boilerplate_web!(); +} #[cfg(target_family = "wasm")] pub use web::*; diff --git a/rust/src/frb_generated.web.rs b/rust/src/frb_generated.web.rs deleted file mode 100644 index 35ff38c..0000000 --- a/rust/src/frb_generated.web.rs +++ /dev/null @@ -1,15 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. - -// Section: imports - -use super::*; -use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; -use flutter_rust_bridge::for_generated::wasm_bindgen; -use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*; -use flutter_rust_bridge::{Handler, IntoIntoDart}; - -// Section: boilerplate - -flutter_rust_bridge::frb_generated_boilerplate_web!(); diff --git a/rust_builder/cargokit/gradle/plugin.gradle b/rust_builder/cargokit/gradle/plugin.gradle index 2fc1d70..1aead89 100644 --- a/rust_builder/cargokit/gradle/plugin.gradle +++ b/rust_builder/cargokit/gradle/plugin.gradle @@ -119,8 +119,12 @@ class CargoKitPlugin implements Plugin { } def cargoBuildDir = "${project.buildDir}/build" + + // Determine if the project is an application or library + def isApplication = plugin.project.plugins.hasPlugin('com.android.application') + def variants = isApplication ? plugin.project.android.applicationVariants : plugin.project.android.libraryVariants - plugin.project.android.applicationVariants.all { variant -> + variants.all { variant -> final buildType = variant.buildType.name diff --git a/web/index.html b/web/index.html index d57f80b..1bf4937 100644 --- a/web/index.html +++ b/web/index.html @@ -31,29 +31,8 @@ kobi - - - - - + diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest index a42ea76..153653e 100644 --- a/windows/runner/runner.exe.manifest +++ b/windows/runner/runner.exe.manifest @@ -9,12 +9,6 @@ - - - - - - diff --git a/windows/runner/utils.cpp b/windows/runner/utils.cpp index b2b0873..3a0b465 100644 --- a/windows/runner/utils.cpp +++ b/windows/runner/utils.cpp @@ -45,13 +45,13 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) { if (utf16_string == nullptr) { return std::string(); } - int target_length = ::WideCharToMultiByte( + unsigned int target_length = ::WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, -1, nullptr, 0, nullptr, nullptr) -1; // remove the trailing null character int input_length = (int)wcslen(utf16_string); std::string utf8_string; - if (target_length <= 0 || target_length > utf8_string.max_size()) { + if (target_length == 0 || target_length > utf8_string.max_size()) { return utf8_string; } utf8_string.resize(target_length);