upgrade deps

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-05-20 12:27:37 +08:00
parent 69ecdaef46
commit 7121376d50
6 changed files with 70 additions and 71 deletions

View File

@@ -117,13 +117,12 @@ Future<void> importFromClipBoard<T>(
Future<void> importFromLocalFile<T>({ Future<void> importFromLocalFile<T>({
required FutureOr<void> Function(T json) onImport, required FutureOr<void> Function(T json) onImport,
}) async { }) async {
final result = await FilePicker.pickFiles( final result = await FilePicker.pickFile(
type: .custom, type: .custom,
allowedExtensions: const ['json', 'txt'], allowedExtensions: const ['json', 'txt'],
); );
if (result != null) { if (result != null) {
final path = result.files.first.path; final path = result.xFile.path;
if (path != null) {
final data = await File(path).readAsString(); final data = await File(path).readAsString();
final T json; final T json;
try { try {
@@ -139,7 +138,6 @@ Future<void> importFromLocalFile<T>({
SmartDialog.showToast('导入失败:$e'); SmartDialog.showToast('导入失败:$e');
} }
} }
}
} }
void importFromInput<T>( void importFromInput<T>(

View File

@@ -634,14 +634,13 @@ class HeaderControlState extends State<HeaderControl>
onTap: () async { onTap: () async {
Get.back(); Get.back();
try { try {
final result = await FilePicker.pickFiles( final result = await FilePicker.pickFile(
type: .custom, type: .custom,
allowedExtensions: const ['json', 'vtt', 'srt'], allowedExtensions: const ['json', 'vtt', 'srt'],
); );
if (result != null) { if (result != null) {
final file = result.files.single; final file = result.xFile;
final path = file.path; final path = file.path;
if (path != null) {
final name = file.name; final name = file.name;
final length = videoDetailCtr.subtitles.length; final length = videoDetailCtr.subtitles.length;
if (name.endsWith('.json')) { if (name.endsWith('.json')) {
@@ -679,7 +678,6 @@ class HeaderControlState extends State<HeaderControl>
); );
await videoDetailCtr.setSubtitle(length + 1); await videoDetailCtr.setSubtitle(length + 1);
} }
}
} catch (e) { } catch (e) {
SmartDialog.showToast('加载失败: $e'); SmartDialog.showToast('加载失败: $e');
} }

View File

@@ -320,6 +320,7 @@ abstract final class ImageUtils {
final savePath = await FilePicker.saveFile( final savePath = await FilePicker.saveFile(
type: FileType.image, type: FileType.image,
fileName: fileName, fileName: fileName,
bytes: Uint8List(0),
); );
if (savePath == null) { if (savePath == null) {
SmartDialog.showToast("取消保存"); SmartDialog.showToast("取消保存");
@@ -357,6 +358,7 @@ abstract final class ImageUtils {
final savePath = await FilePicker.saveFile( final savePath = await FilePicker.saveFile(
type: type, type: type,
fileName: fileName, fileName: fileName,
bytes: Uint8List(0),
); );
if (savePath == null) { if (savePath == null) {
SmartDialog.showToast("取消保存"); SmartDialog.showToast("取消保存");

View File

@@ -17,7 +17,7 @@ abstract final class StorageUtils {
allowedExtensions: allowedExtensions, allowedExtensions: allowedExtensions,
type: type, type: type,
fileName: name, fileName: name,
bytes: PlatformUtils.isDesktop ? null : bytes, bytes: PlatformUtils.isDesktop ? Uint8List(0) : bytes,
); );
if (path == null) { if (path == null) {
SmartDialog.showToast("取消保存"); SmartDialog.showToast("取消保存");

View File

@@ -498,10 +498,10 @@ packages:
description: description:
path: "." path: "."
ref: dev ref: dev
resolved-ref: "8cf6cfa7078aa69c2c7b08d9ad636a1040456852" resolved-ref: c4672374956fa28d117ef7a55a6e708daddbf462
url: "https://github.com/bggRGjQaUbCoE/flutter_file_picker.git" url: "https://github.com/bggRGjQaUbCoE/flutter_file_picker.git"
source: git source: git
version: "12.0.0-beta.3" version: "12.0.0-beta.4"
file_selector_linux: file_selector_linux:
dependency: transitive dependency: transitive
description: description:
@@ -725,10 +725,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_volume_controller name: flutter_volume_controller
sha256: "22edb0993ad03ecbc8d1164daeb5b39d798d409625db692675a86889403b1532" sha256: "27b95004d8abd7c6b24a63e555d721ef5f958fbe54551246567b72321494c6c8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.4" version: "2.0.0"
flutter_web_plugins: flutter_web_plugins:
dependency: transitive dependency: transitive
description: flutter description: flutter
@@ -1102,7 +1102,7 @@ packages:
description: description:
path: media_kit path: media_kit
ref: "version_1.2.5" ref: "version_1.2.5"
resolved-ref: "14c3ee41df4f51292b89eaf8f8c97420220fe136" resolved-ref: "4f0f72e5bf21349bc251bf52761628faeae3f233"
url: "https://github.com/My-Responsitories/media-kit.git" url: "https://github.com/My-Responsitories/media-kit.git"
source: git source: git
version: "1.1.11" version: "1.1.11"
@@ -1111,7 +1111,7 @@ packages:
description: description:
path: "libs/android/media_kit_libs_android_video" path: "libs/android/media_kit_libs_android_video"
ref: "version_1.2.5" ref: "version_1.2.5"
resolved-ref: "14c3ee41df4f51292b89eaf8f8c97420220fe136" resolved-ref: "4f0f72e5bf21349bc251bf52761628faeae3f233"
url: "https://github.com/My-Responsitories/media-kit.git" url: "https://github.com/My-Responsitories/media-kit.git"
source: git source: git
version: "1.3.7" version: "1.3.7"
@@ -1145,7 +1145,7 @@ packages:
description: description:
path: "libs/universal/media_kit_libs_video" path: "libs/universal/media_kit_libs_video"
ref: "version_1.2.5" ref: "version_1.2.5"
resolved-ref: "14c3ee41df4f51292b89eaf8f8c97420220fe136" resolved-ref: "4f0f72e5bf21349bc251bf52761628faeae3f233"
url: "https://github.com/My-Responsitories/media-kit.git" url: "https://github.com/My-Responsitories/media-kit.git"
source: git source: git
version: "1.0.5" version: "1.0.5"
@@ -1154,7 +1154,7 @@ packages:
description: description:
path: "libs/windows/media_kit_libs_windows_video" path: "libs/windows/media_kit_libs_windows_video"
ref: "version_1.2.5" ref: "version_1.2.5"
resolved-ref: "14c3ee41df4f51292b89eaf8f8c97420220fe136" resolved-ref: "4f0f72e5bf21349bc251bf52761628faeae3f233"
url: "https://github.com/My-Responsitories/media-kit.git" url: "https://github.com/My-Responsitories/media-kit.git"
source: git source: git
version: "1.0.10" version: "1.0.10"
@@ -1163,7 +1163,7 @@ packages:
description: description:
path: media_kit_native_event_loop path: media_kit_native_event_loop
ref: "version_1.2.5" ref: "version_1.2.5"
resolved-ref: "14c3ee41df4f51292b89eaf8f8c97420220fe136" resolved-ref: "4f0f72e5bf21349bc251bf52761628faeae3f233"
url: "https://github.com/My-Responsitories/media-kit.git" url: "https://github.com/My-Responsitories/media-kit.git"
source: git source: git
version: "1.0.9" version: "1.0.9"
@@ -1172,7 +1172,7 @@ packages:
description: description:
path: media_kit_video path: media_kit_video
ref: "version_1.2.5" ref: "version_1.2.5"
resolved-ref: "14c3ee41df4f51292b89eaf8f8c97420220fe136" resolved-ref: "4f0f72e5bf21349bc251bf52761628faeae3f233"
url: "https://github.com/My-Responsitories/media-kit.git" url: "https://github.com/My-Responsitories/media-kit.git"
source: git source: git
version: "1.2.5" version: "1.2.5"
@@ -1229,10 +1229,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: objective_c name: objective_c
sha256: "100a1c87616ab6ed41ec263b083c0ef3261ee6cd1dc3b0f35f8ddfa4f996fe52" sha256: "02f4ff97ac95fa4abe561242eb033239e08e8903a46eaecf61b047761b89fe1f"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.3.0" version: "9.4.0"
octo_image: octo_image:
dependency: transitive dependency: transitive
description: description:
@@ -1822,10 +1822,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_android name: url_launcher_android
sha256: "3bb000251e55d4a209aa0e2e563309dc9bb2befea2295fd0cec1f51760aac572" sha256: "17bc677f0b301615530dd1d67e0a9828cafa2d0b6b6eae4cd3679b7eac4a273c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.3.29" version: "6.3.30"
url_launcher_ios: url_launcher_ios:
dependency: transitive dependency: transitive
description: description:

View File

@@ -94,7 +94,7 @@ dependencies:
url: https://github.com/bggRGjQaUbCoE/flutter_sortable_wrap.git url: https://github.com/bggRGjQaUbCoE/flutter_sortable_wrap.git
ref: master ref: master
flutter_svg: ^2.0.14 flutter_svg: ^2.0.14
flutter_volume_controller: ^1.3.3 flutter_volume_controller: ^2.0.0
font_awesome_flutter: font_awesome_flutter:
git: git:
url: https://github.com/bggRGjQaUbCoE/font_awesome_flutter.git url: https://github.com/bggRGjQaUbCoE/font_awesome_flutter.git
@@ -168,6 +168,7 @@ dependency_overrides:
url: https://github.com/bggRGjQaUbCoE/flutter_inappwebview.git url: https://github.com/bggRGjQaUbCoE/flutter_inappwebview.git
path: flutter_inappwebview_android path: flutter_inappwebview_android
ref: v6.1.5 ref: v6.1.5
flutter_volume_controller: ^2.0.0
media_kit: media_kit:
git: git:
url: https://github.com/My-Responsitories/media-kit.git url: https://github.com/My-Responsitories/media-kit.git