From 694b9d198d21f4f4a38a810465f77c2a611113b4 Mon Sep 17 00:00:00 2001 From: LiXiaoqi <2360211477@qq.com> Date: Fri, 6 Sep 2024 10:34:04 +0800 Subject: [PATCH] slider has bug --- .flutter-plugins | 1 + .flutter-plugins-dependencies | 2 +- lib/pages/pass_track/view.dart | 3 +++ pubspec.lock | 7 +++++++ pubspec.yaml | 4 ++-- windows/flutter/generated_plugin_registrant.cc | 3 +++ windows/flutter/generated_plugins.cmake | 1 + 7 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.flutter-plugins b/.flutter-plugins index 5d0bb0f..e14a1e0 100644 --- a/.flutter-plugins +++ b/.flutter-plugins @@ -1,4 +1,5 @@ # This is a generated file; do not edit or check into version control. +pass_track=G:\\workplace\\cpnav\\plugins\\pass_track\\ path_provider=C:\\Users\\Adminis\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider-2.1.4\\ path_provider_android=C:\\Users\\Adminis\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_android-2.2.10\\ path_provider_foundation=C:\\Users\\Adminis\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_foundation-2.4.0\\ diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index a647325..d722f01 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"pass_track","path":"G:\\\\workplace\\\\cpnav\\\\plugins\\\\pass_track\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.2.10\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"pass_track","path":"G:\\\\workplace\\\\cpnav\\\\plugins\\\\pass_track\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"pass_track","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-09-06 09:19:51.601720","version":"3.24.2","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"pass_track","path":"G:\\\\workplace\\\\cpnav\\\\plugins\\\\pass_track\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.2.10\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"pass_track","path":"G:\\\\workplace\\\\cpnav\\\\plugins\\\\pass_track\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\Adminis\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"pass_track","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-09-06 10:27:39.418202","version":"3.24.2","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/lib/pages/pass_track/view.dart b/lib/pages/pass_track/view.dart index c712c6a..53bfd85 100644 --- a/lib/pages/pass_track/view.dart +++ b/lib/pages/pass_track/view.dart @@ -82,6 +82,9 @@ class _PasstrackState extends State { }); initPlatformState(); controller.getHisFileList(_passTrackPlugin); + if (controller.allLen <= 0) { + return; + } _passTrackPlugin.generateTile(0, controller.allLen); _passTrackPlugin.waitForTile(); _passTrackPlugin.playTrack(0, controller.allLen, true, 0, ffi.nullptr); diff --git a/pubspec.lock b/pubspec.lock index f6aba3d..5980a74 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -219,6 +219,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.15.0" + pass_track: + dependency: "direct main" + description: + path: "plugins/pass_track" + relative: true + source: path + version: "0.0.1" path: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c36d79f..bcd72a2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,8 +32,8 @@ dependencies: sdk: flutter scence_map: path: plugins/scence_map - # pass_track: - # path: plugins/pass_track + pass_track: + path: plugins/pass_track # git: https://git.mcxa.cn:89/LiXiaoqi/pass_track.git # ref: main # The following adds the Cupertino Icons font to your application. diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..075413e 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + PassTrackPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("PassTrackPluginCApi")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..2e2cdc4 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + pass_track ) list(APPEND FLUTTER_FFI_PLUGIN_LIST