From 71757ada971c67b25f7e9625a81d524f0ed2dfad Mon Sep 17 00:00:00 2001 From: orz12 Date: Fri, 22 Mar 2024 00:30:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4jpe=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E4=B8=BAjpg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/download.dart | 2 +- pubspec.lock | 11 ++++++----- pubspec.yaml | 3 +++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/utils/download.dart b/lib/utils/download.dart index 38657fe5..c8dec771 100644 --- a/lib/utils/download.dart +++ b/lib/utils/download.dart @@ -23,7 +23,7 @@ class DownloadUtils { var response = await Dio() .get(imgUrl, options: Options(responseType: ResponseType.bytes)); String picName = - "PiliPalaX_${imgType}_${DateTime.now().toString().split('-').join()}"; + "${imgType}_${DateTime.now().toString().replaceAll(' ', '_').replaceAll(':', '-').split('.').first}"; final SaveResult result = await SaverGallery.saveImage( Uint8List.fromList(response.data), quality: 100, diff --git a/pubspec.lock b/pubspec.lock index f09b6856..00d38146 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -935,12 +935,13 @@ packages: source: hosted version: "1.10.0" mime: - dependency: transitive + dependency: "direct overridden" description: - name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" - source: hosted + path: "." + ref: HEAD + resolved-ref: "922e1f3d0b68291c42a2ec3a83542a886ea9b041" + url: "https://github.com/orz12/mime/" + source: git version: "1.0.5" nil: dependency: "direct main" diff --git a/pubspec.yaml b/pubspec.yaml index f6e212cd..ed666f9e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -141,6 +141,9 @@ dependencies: #瀑布流 waterfall_flow: ^3.0.3 marquee: ^2.2.3 +dependency_overrides: + mime: + git: https://github.com/orz12/mime/ dev_dependencies: flutter_test: