From 9511adf912b6bb4b4f495d59e98ce09233695511 Mon Sep 17 00:00:00 2001 From: honjow Date: Mon, 25 Oct 2021 19:17:29 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=20=E5=AE=8C=E5=96=84=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/download_controller.dart | 3 +- lib/generated/intl/messages_en.dart | 5 + lib/generated/intl/messages_ko_KR.dart | 5 + lib/generated/intl/messages_zh_CN.dart | 4 + lib/generated/intl/messages_zh_TW.dart | 5 + lib/generated/l10n.dart | 30 ++++ lib/l10n/intl_en.arb | 5 +- lib/l10n/intl_ko_KR.arb | 5 +- lib/l10n/intl_zh_CN.arb | 5 +- lib/l10n/intl_zh_TW.arb | 5 +- .../controller/view_ext_contorller.dart | 21 +-- lib/pages/item/download_gallery_item.dart | 3 +- .../controller/download_view_controller.dart | 136 ++++++++++++++++-- lib/pages/tab/view/unlock_page.dart | 35 ----- lib/store/floor/dao/image_task_dao.dart | 3 + lib/store/floor/database.g.dart | 7 + lib/utils/utility.dart | 14 ++ pubspec.lock | 40 +----- pubspec.yaml | 20 +-- 19 files changed, 242 insertions(+), 109 deletions(-) diff --git a/lib/common/controller/download_controller.dart b/lib/common/controller/download_controller.dart index b89c1d7b9..d34af98b6 100644 --- a/lib/common/controller/download_controller.dart +++ b/lib/common/controller/download_controller.dart @@ -255,6 +255,7 @@ class DownloadController extends GetxController { /// 移除任务 Future removeDownloadGalleryTask({ required int gid, + bool shouldDeleteContent = true, }) async { GalleryTaskDao _galleryTaskDao; ImageTaskDao _imageTaskDao; @@ -266,7 +267,7 @@ class DownloadController extends GetxController { } String? dirpath = _task.realDirPath; logger.d('dirPath: $dirpath'); - if (dirpath != null) { + if (dirpath != null && shouldDeleteContent) { Directory(dirpath).delete(recursive: true); } diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 779084e95..e9e4d2c83 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -69,6 +69,11 @@ class MessageLookup extends MessageLookupByLibrary { "default_favorites": MessageLookupByLibrary.simpleMessage("Default Favorites"), "delete": MessageLookupByLibrary.simpleMessage("Delete"), + "delete_task": MessageLookupByLibrary.simpleMessage("Delete Task"), + "delete_task_and_content": + MessageLookupByLibrary.simpleMessage("Delete task and content"), + "delete_task_only": + MessageLookupByLibrary.simpleMessage("Delete task only"), "disabled": MessageLookupByLibrary.simpleMessage("Disabled"), "domain_fronting": MessageLookupByLibrary.simpleMessage("Domain fronting"), diff --git a/lib/generated/intl/messages_ko_KR.dart b/lib/generated/intl/messages_ko_KR.dart index 476bc04d9..2513a3325 100644 --- a/lib/generated/intl/messages_ko_KR.dart +++ b/lib/generated/intl/messages_ko_KR.dart @@ -61,6 +61,11 @@ class MessageLookup extends MessageLookupByLibrary { "dark_mode_effect": MessageLookupByLibrary.simpleMessage("다크 모드 효과"), "default_favorites": MessageLookupByLibrary.simpleMessage("기본 즐겨찾기"), "delete": MessageLookupByLibrary.simpleMessage("지우기"), + "delete_task": MessageLookupByLibrary.simpleMessage("Delete Task"), + "delete_task_and_content": + MessageLookupByLibrary.simpleMessage("Delete task and content"), + "delete_task_only": + MessageLookupByLibrary.simpleMessage("Delete task only"), "disabled": MessageLookupByLibrary.simpleMessage("비활성화 됨"), "domain_fronting": MessageLookupByLibrary.simpleMessage("도메인 프론팅"), "done": MessageLookupByLibrary.simpleMessage("완료"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 06b0d7582..e2be74cfb 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -59,6 +59,10 @@ class MessageLookup extends MessageLookupByLibrary { "dark_mode_effect": MessageLookupByLibrary.simpleMessage("深色模式效果"), "default_favorites": MessageLookupByLibrary.simpleMessage("默认收藏夹设置"), "delete": MessageLookupByLibrary.simpleMessage("删除"), + "delete_task": MessageLookupByLibrary.simpleMessage("删除任务"), + "delete_task_and_content": + MessageLookupByLibrary.simpleMessage("删除任务和下载内容"), + "delete_task_only": MessageLookupByLibrary.simpleMessage("仅删除任务"), "disabled": MessageLookupByLibrary.simpleMessage("停用"), "domain_fronting": MessageLookupByLibrary.simpleMessage("域名前置"), "done": MessageLookupByLibrary.simpleMessage("完成"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 9dbeed786..570c51158 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -64,6 +64,11 @@ class MessageLookup extends MessageLookupByLibrary { "default_favorites": MessageLookupByLibrary.simpleMessage("Default Favorites"), "delete": MessageLookupByLibrary.simpleMessage("刪除"), + "delete_task": MessageLookupByLibrary.simpleMessage("Delete Task"), + "delete_task_and_content": + MessageLookupByLibrary.simpleMessage("Delete task and content"), + "delete_task_only": + MessageLookupByLibrary.simpleMessage("Delete task only"), "disabled": MessageLookupByLibrary.simpleMessage("停用"), "domain_fronting": MessageLookupByLibrary.simpleMessage("域名前置"), "done": MessageLookupByLibrary.simpleMessage("Done"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 729d5a391..3fd122640 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -1849,6 +1849,36 @@ class L10n { args: [], ); } + + /// `Delete Task` + String get delete_task { + return Intl.message( + 'Delete Task', + name: 'delete_task', + desc: '', + args: [], + ); + } + + /// `Delete task only` + String get delete_task_only { + return Intl.message( + 'Delete task only', + name: 'delete_task_only', + desc: '', + args: [], + ); + } + + /// `Delete task and content` + String get delete_task_and_content { + return Intl.message( + 'Delete task and content', + name: 'delete_task_and_content', + desc: '', + args: [], + ); + } } class AppLocalizationDelegate extends LocalizationsDelegate { diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 36c048f71..919dadbd4 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -178,5 +178,8 @@ "sync_read_progress": "Sync read progress", "skip": "Skip", "export": "Export", - "read_from_clipboard": "Read from clipboard" + "read_from_clipboard": "Read from clipboard", + "delete_task": "Delete Task", + "delete_task_only": "Delete task only", + "delete_task_and_content": "Delete task and content" } \ No newline at end of file diff --git a/lib/l10n/intl_ko_KR.arb b/lib/l10n/intl_ko_KR.arb index 88e4a6911..f4d34adc7 100644 --- a/lib/l10n/intl_ko_KR.arb +++ b/lib/l10n/intl_ko_KR.arb @@ -178,5 +178,8 @@ "sync_read_progress": "Sync read progress", "skip": "Skip", "export": "Export", - "read_from_clipboard": "Read from clipboard" + "read_from_clipboard": "Read from clipboard", + "delete_task": "Delete Task", + "delete_task_only": "Delete task only", + "delete_task_and_content": "Delete task and content" } \ No newline at end of file diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 6141a94cc..67a151afe 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -178,5 +178,8 @@ "sync_read_progress": "同步阅读进度", "skip": "跳过", "export": "导出", - "read_from_clipboard": "从剪贴板读取" + "read_from_clipboard": "从剪贴板读取", + "delete_task": "删除任务", + "delete_task_only": "仅删除任务", + "delete_task_and_content": "删除任务和下载内容" } \ No newline at end of file diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 0960efc4a..a58af13f5 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -178,5 +178,8 @@ "sync_read_progress": "Sync read progress", "skip": "Skip", "export": "Export", - "read_from_clipboard": "Read from clipboard" + "read_from_clipboard": "Read from clipboard", + "delete_task": "Delete Task", + "delete_task_only": "Delete task only", + "delete_task_and_content": "Delete task and content" } \ No newline at end of file diff --git a/lib/pages/image_view/controller/view_ext_contorller.dart b/lib/pages/image_view/controller/view_ext_contorller.dart index a129857f0..7cdd40963 100644 --- a/lib/pages/image_view/controller/view_ext_contorller.dart +++ b/lib/pages/image_view/controller/view_ext_contorller.dart @@ -18,7 +18,7 @@ import 'package:fehviewer/utils/vibrate.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_statusbar_manager/flutter_statusbar_manager.dart'; +// import 'package:flutter_statusbar_manager/flutter_statusbar_manager.dart'; import 'package:get/get.dart'; import 'package:orientation/orientation.dart'; import 'package:path/path.dart' as path; @@ -172,7 +172,8 @@ class ViewExtController extends GetxController { vState.sliderValue = vState.currentItemIndex / 1.0; if (GetPlatform.isIOS) { - FlutterStatusbarManager.setFullscreen(true); + setFullscreen(); + // FlutterStatusbarManager.setFullscreen(true); } // FlutterStatusbarManager.setHidden(true, // animation: StatusBarAnimation.SLIDE); @@ -194,10 +195,12 @@ class ViewExtController extends GetxController { extendedPageController.dispose(); vState.getMoreCancelToken.cancel(); - FlutterStatusbarManager.setHidden(false, - animation: StatusBarAnimation.SLIDE); - FlutterStatusbarManager.setFullscreen(false); - FlutterStatusbarManager.setTranslucent(false); + unsetFullscreen(); + + // FlutterStatusbarManager.setHidden(false, + // animation: StatusBarAnimation.SLIDE); + // FlutterStatusbarManager.setFullscreen(false); + // FlutterStatusbarManager.setTranslucent(false); // 恢复系统旋转设置 logger.v('恢复系统旋转设置'); @@ -474,7 +477,8 @@ class ViewExtController extends GetxController { if (GetPlatform.isIOS) { if (!vState.showBar) { // show - FlutterStatusbarManager.setFullscreen(false); + // FlutterStatusbarManager.setFullscreen(false); + unsetFullscreen(); vState.showBar = !vState.showBar; update([idViewBar]); } else { @@ -482,7 +486,8 @@ class ViewExtController extends GetxController { vState.showBar = !vState.showBar; update([idViewBar]); // await Future.delayed(const Duration(milliseconds: 200)); - FlutterStatusbarManager.setFullscreen(true); + // FlutterStatusbarManager.setFullscreen(true); + setFullscreen(); // FlutterStatusbarManager.setHidden(true); } } else { diff --git a/lib/pages/item/download_gallery_item.dart b/lib/pages/item/download_gallery_item.dart index df4ae6f79..714a3f6ef 100644 --- a/lib/pages/item/download_gallery_item.dart +++ b/lib/pages/item/download_gallery_item.dart @@ -211,7 +211,8 @@ class DownloadGalleryItem extends GetView { Widget _buildCover({bool cardType = false}) { return GestureDetector( child: DownloadItemCoverImage( - filePath: galleryTask.coverImage != null + filePath: (galleryTask.coverImage != null && + galleryTask.coverImage!.isNotEmpty) ? path.join(galleryTask.realDirPath ?? '', galleryTask.coverImage) : null, url: galleryTask.coverUrl, diff --git a/lib/pages/tab/controller/download_view_controller.dart b/lib/pages/tab/controller/download_view_controller.dart index 6449d4416..e152c715f 100644 --- a/lib/pages/tab/controller/download_view_controller.dart +++ b/lib/pages/tab/controller/download_view_controller.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:collection/collection.dart'; import 'package:archive/archive_io.dart'; import 'package:fehviewer/common/controller/archiver_download_controller.dart'; import 'package:fehviewer/common/controller/download_controller.dart'; @@ -19,11 +20,10 @@ import 'package:fehviewer/utils/utility.dart'; import 'package:fehviewer/utils/vibrate.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter_app_restart/flutter_app_restart.dart'; +// import 'package:flutter_app_restart/flutter_app_restart.dart'; import 'package:flutter_downloader/flutter_downloader.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; -import 'package:line_icons/line_icons.dart'; import 'package:path/path.dart' as path; import 'package:restart_app/restart_app.dart'; import 'package:share/share.dart'; @@ -143,7 +143,10 @@ class DownloadViewController extends GetxController { } // Archiver移除任务 - void removeArchiverTask(int index) { + void removeArchiverTask( + int index, { + bool shouldDeleteContent = true, + }) { final String? _oriTaskid = archiverTasks[index].taskId; final String? _tag = archiverTasks[index].tag; @@ -155,14 +158,22 @@ class DownloadViewController extends GetxController { // _archiverDownloadController.archiverTaskMap.remove(_tag); _archiverDownloadController.removeTask(_tag); FlutterDownloader.remove( - taskId: _oriTaskid ?? '', shouldDeleteContent: true); + taskId: _oriTaskid ?? '', + shouldDeleteContent: shouldDeleteContent, + ); update([idDownloadArchiverView]); } // Gallery 移除任务 - void removeGalleryTask(int index) { + void removeGalleryTask( + int index, { + bool shouldDeleteContent = true, + }) { final GalleryTask _task = galleryTasks[index]; - _downloadController.removeDownloadGalleryTask(gid: _task.gid); + _downloadController.removeDownloadGalleryTask( + gid: _task.gid, + shouldDeleteContent: shouldDeleteContent, + ); animatedGalleryListKey.currentState?.removeItem( index, (context, animation) => @@ -219,10 +230,8 @@ class DownloadViewController extends GetxController { // 删除下载项 CupertinoActionSheetAction( onPressed: () { - type == DownloadType.archiver - ? removeArchiverTask(taskIndex) - : removeGalleryTask(taskIndex); Get.back(); + _showDeleteDialog(taskIndex, type); }, child: Text( L10n.of(context).delete, @@ -234,6 +243,51 @@ class DownloadViewController extends GetxController { }); } + Future _showDeleteDialog(int taskIndex, DownloadType type) async { + return showCupertinoDialog( + context: Get.overlayContext!, + barrierDismissible: true, + builder: (BuildContext context) { + return CupertinoAlertDialog( + title: Text(L10n.of(context).delete_task), + // content: const Text('Import and Export download task'), + actions: [ + CupertinoDialogAction( + onPressed: () async { + Get.back(); + type == DownloadType.archiver + ? removeArchiverTask(taskIndex, shouldDeleteContent: false) + : removeGalleryTask(taskIndex, shouldDeleteContent: false); + }, + child: Text( + L10n.of(context).delete_task_only, + style: const TextStyle(color: CupertinoColors.destructiveRed), + ), + ), + CupertinoDialogAction( + onPressed: () async { + Get.back(); + type == DownloadType.archiver + ? removeArchiverTask(taskIndex) + : removeGalleryTask(taskIndex); + }, + child: Text( + L10n.of(context).delete_task_and_content, + style: const TextStyle(color: CupertinoColors.destructiveRed), + ), + ), + CupertinoDialogAction( + onPressed: () async { + Get.back(); + }, + child: Text(L10n.of(context).cancel), + ), + ], + ); + }, + ); + } + Future _showExportSheet({GalleryTask? task}) async { if (task == null) { return; @@ -424,8 +478,61 @@ class DownloadViewController extends GetxController { // 从临时db导入任务数据 final ehDB = await Global.getDatabase(); - await ehDB.imageTaskDao.insertOrReplaceImageTasks(allImageTasks); - await ehDB.galleryTaskDao.insertOrReplaceTasks(allTasks); + + final taskMap = {}; + final taskCompletMap = {}; + + // 导入 imagetask + for (final imageTask in allImageTasks) { + late GalleryTask? _task; + if (taskMap[imageTask.gid] != null) { + _task = taskMap[imageTask.gid]; + } else { + _task = allTasks + .firstWhereOrNull((element) => element.gid == imageTask.gid); + taskMap[imageTask.gid] = _task; + } + if (_task == null || _task.realDirPath == null) { + continue; + } + + final _filePath = path.join(_task.realDirPath!, imageTask.filePath); + // logger.d(_filePath); + + taskCompletMap.putIfAbsent(imageTask.gid, () => 0); + if (File(_filePath).existsSync()) { + // logger.d( + // 'insertOrReplaceImageTask complete ${imageTask.gid}/${imageTask.filePath}'); + await ehDB.imageTaskDao.insertOrReplaceImageTask( + imageTask.copyWith(status: TaskStatus.complete.value)); + taskCompletMap.update(imageTask.gid, (val) => val + 1, + ifAbsent: () => 1); + } else { + // logger.d( + // 'insertOrReplaceImageTask enqueued ${imageTask.gid}/${imageTask.filePath}'); + await ehDB.imageTaskDao.insertOrReplaceImageTask( + imageTask.copyWith(status: TaskStatus.enqueued.value)); + } + } + + // 导入task + final allOriTasks = await ehDB.galleryTaskDao.findAllGalleryTasks(); + for (final task in allTasks) { + GalleryTask? _oriTask = + allOriTasks.firstWhereOrNull((element) => element.gid == task.gid); + // 插入新的任务 + if (_oriTask == null) { + final _task = task.copyWith( + coverImage: '', + status: TaskStatus.paused.value, + completCount: taskCompletMap[task.gid] ?? 0, + ); + logger.d('insert ${_task.toString()}'); + await ehDB.galleryTaskDao.insertTask(_task); + _downloadController.dState.galleryTaskMap[_task.gid] = _task; + animateGalleryListAddTask(); + } + } } String _getLocalFilePath() { @@ -463,6 +570,7 @@ class DownloadViewController extends GetxController { Future importTaskInfoFile() async { await requestManageExternalStoragePermission(); + final FilePickerResult? result = await FilePicker.platform.pickFiles(); logger.d('import file $result'); if (result != null) { @@ -470,7 +578,7 @@ class DownloadViewController extends GetxController { await _readTaskInfoFile(_file); _downloadController.initGalleryTasks(); update([idDownloadGalleryView]); - await _showRestartAppDialog(); + // await _showRestartAppDialog(); } } } @@ -487,8 +595,8 @@ Future _showRestartAppDialog() async { CupertinoDialogAction( onPressed: () async { Get.back(); - // Restart.restartApp(); - await FlutterRestart.restartApp(); + await Restart.restartApp(); + // await FlutterRestart.restartApp(); }, child: const Text('Restart Now'), ), diff --git a/lib/pages/tab/view/unlock_page.dart b/lib/pages/tab/view/unlock_page.dart index b9f5e8596..2dd1db581 100644 --- a/lib/pages/tab/view/unlock_page.dart +++ b/lib/pages/tab/view/unlock_page.dart @@ -3,7 +3,6 @@ import 'package:fehviewer/utils/logger.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:pattern_lock/pattern_lock.dart'; class UnLockPage extends StatefulWidget { const UnLockPage({ @@ -57,40 +56,6 @@ class _UnLockPageState extends State { )); } - Container _buildPatternLock(BuildContext context) { - return Container( - constraints: BoxConstraints( - maxHeight: context.mediaQueryShortestSide, - maxWidth: context.mediaQueryShortestSide, - ), - child: PatternLock( - notSelectedColor: CupertinoDynamicColor.resolve( - CupertinoColors.secondaryLabel, context), - - // color of selected points. - selectedColor: - CupertinoDynamicColor.resolve(CupertinoColors.activeGreen, context), - // radius of points. - pointRadius: 10, - // whether show user's input and highlight selected points. - showInput: true, - // count of points horizontally and vertically. - dimension: 3, - // padding of points area relative to distance between points. - relativePadding: 0.7, - // needed distance from input to point to select point. - selectThreshold: 25, - // whether fill points. - fillPoints: true, - // callback that called when user's input complete. Called if user selected one or more points. - onInputComplete: (List input) { - logger.v('pattern is $input'); - controller.infoText = '$input'; - }, - ), - ); - } - Widget _buildText(BuildContext context) { return Obx(() => Text( controller.infoText, diff --git a/lib/store/floor/dao/image_task_dao.dart b/lib/store/floor/dao/image_task_dao.dart index 0632cdb8c..df2c971b2 100644 --- a/lib/store/floor/dao/image_task_dao.dart +++ b/lib/store/floor/dao/image_task_dao.dart @@ -16,6 +16,9 @@ abstract class ImageTaskDao { @insert Future insertImageTask(GalleryImageTask galleryImageTask); + @Insert(onConflict: OnConflictStrategy.replace) + Future insertOrReplaceImageTask(GalleryImageTask galleryImageTask); + @insert Future insertImageTasks(List galleryImageTasks); diff --git a/lib/store/floor/database.g.dart b/lib/store/floor/database.g.dart index 9557ea333..e48f4d510 100644 --- a/lib/store/floor/database.g.dart +++ b/lib/store/floor/database.g.dart @@ -400,6 +400,13 @@ class _$ImageTaskDao extends ImageTaskDao { galleryImageTask, OnConflictStrategy.abort); } + @override + Future insertOrReplaceImageTask( + GalleryImageTask galleryImageTask) async { + await _galleryImageTaskInsertionAdapter.insert( + galleryImageTask, OnConflictStrategy.replace); + } + @override Future insertImageTasks( List galleryImageTasks) async { diff --git a/lib/utils/utility.dart b/lib/utils/utility.dart index b5d36affd..0ec3010d2 100644 --- a/lib/utils/utility.dart +++ b/lib/utils/utility.dart @@ -12,9 +12,14 @@ import 'package:fehviewer/utils/toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:get/utils.dart'; import 'package:permission_handler/permission_handler.dart'; Future requestManageExternalStoragePermission() async { + if (!GetPlatform.isAndroid) { + return; + } final PermissionStatus statusMStorage = await Permission.manageExternalStorage.status; logger.d('manageExternalStorage $statusMStorage'); @@ -35,6 +40,15 @@ Future requestManageExternalStoragePermission() async { } } +void setFullscreen() { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky); +} + +void unsetFullscreen() { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge, + overlays: [SystemUiOverlay.top]); +} + double? initScaleWithSize({ required Size imageSize, required Size size, diff --git a/pubspec.lock b/pubspec.lock index d33d5cd34..d0c513d3e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -568,13 +568,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_app_restart: - dependency: "direct main" - description: - name: flutter_app_restart - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.0" flutter_blurhash: dependency: transitive description: @@ -687,15 +680,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "5.1.0" - flutter_statusbar_manager: - dependency: "direct main" - description: - path: "." - ref: HEAD - resolved-ref: e81699cdf20d119135df80506302a667ff8c0b7e - url: "https://github.com/NarHakobyan/flutter_statusbar_manager.git" - source: git - version: "3.0.1" flutter_svg: dependency: transitive description: @@ -711,12 +695,10 @@ packages: flutter_vibrate: dependency: "direct main" description: - path: "." - ref: HEAD - resolved-ref: "8f34ad419e446909fa6a9f823bf76fc028f29d00" - url: "https://github.com/honjow/flutter_vibrate.git" - source: git - version: "1.0.0" + name: flutter_vibrate + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" flutter_web_plugins: dependency: transitive description: flutter @@ -729,13 +711,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "9.1.0" - fps_monitor: - dependency: "direct main" - description: - name: fps_monitor - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.0.0" freezed_annotation: dependency: transitive description: @@ -1123,13 +1098,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.3" - pattern_lock: - dependency: "direct main" - description: - name: pattern_lock - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.0.0" pedantic: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c9bd177e8..16cbb7192 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: fehviewer publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.1.29+322 +version: 1.1.29+323 environment: sdk: '>=2.14.0 <3.0.0' @@ -74,9 +74,9 @@ dependencies: reorderables: ^0.4.1 basic_utils: ^3.0.2 # 震动 - flutter_vibrate: - git: - url: https://github.com/honjow/flutter_vibrate.git + flutter_vibrate: ^1.3.0 +# git: +# url: https://github.com/honjow/flutter_vibrate.git # 文件选择 file_picker: ^4.1.2 # 评星 @@ -93,14 +93,14 @@ dependencies: cloud_firestore: ^2.2.0 pretty_dio_logger: ^1.2.0-beta-1 translator: ^0.1.7 - pattern_lock: ^2.0.0 +# pattern_lock: ^2.0.0 orientation: ^1.3.0 vibration: ^1.7.4-nullsafety.0 moor_flutter: ^4.0.0 device_info: ^2.0.1 - flutter_statusbar_manager: - git: - url: https://github.com/NarHakobyan/flutter_statusbar_manager.git +# flutter_statusbar_manager: +# git: +# url: https://github.com/jWinterDay/flutter_statusbar_manager.git # ref: master flutter_easyrefresh: ^2.2.1 flutter_markdown: ^0.6.2 @@ -113,7 +113,7 @@ dependencies: extended_text: ^7.0.0 sprintf: ^6.0.0 keframe: ^2.0.1 - fps_monitor: ^2.0.0 +# fps_monitor: ^2.0.0 executor: ^2.2.2 synchronized: ^3.0.0 isolate_handler: ^1.0.0 @@ -143,7 +143,7 @@ dependencies: wakelock: ^0.5.3+3 jinja: ^0.3.4 restart_app: ^1.1.0 - flutter_app_restart: ^1.0.0 +# flutter_app_restart: ^1.0.0 dev_dependencies: # flutter packages pub run build_runner build --delete-conflicting-outputs