diff --git a/lib/api/client.dart b/lib/api/client.dart index 02a5ca8..b0e01f8 100644 --- a/lib/api/client.dart +++ b/lib/api/client.dart @@ -220,7 +220,7 @@ abstract class _EHApi { } class EHApi extends __EHApi { - EHApi(Dio dio, {required String baseUrl}) : super(dio, baseUrl: baseUrl); + EHApi(super.dio, {required String super.baseUrl}); Future> createToken( {required String username, required String password, diff --git a/lib/api/client.g.dart b/lib/api/client.g.dart index 18320bd..6a6199d 100644 --- a/lib/api/client.g.dart +++ b/lib/api/client.g.dart @@ -26,7 +26,7 @@ class __EHApi implements _EHApi { int? permissions, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; @@ -83,14 +83,14 @@ class __EHApi implements _EHApi { String? username, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = { r'id': id, r'username': username, }; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio .fetch>(_setStreamType>(Options( method: 'GET', @@ -118,11 +118,11 @@ class __EHApi implements _EHApi { @override Future> getStatus({CancelToken? cancel}) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio.fetch>( _setStreamType>(Options( method: 'GET', @@ -162,7 +162,7 @@ class __EHApi implements _EHApi { String? clientPlatform, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; @@ -256,7 +256,7 @@ class __EHApi implements _EHApi { String? clientPlatform, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; @@ -322,7 +322,7 @@ class __EHApi implements _EHApi { String? token, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; @@ -364,11 +364,11 @@ class __EHApi implements _EHApi { String? token, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {r'token': token}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio.fetch>( _setStreamType>(Options( method: 'GET', @@ -399,11 +399,11 @@ class __EHApi implements _EHApi { int id, { CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio .fetch>(_setStreamType>>(Options( method: 'GET', @@ -434,11 +434,11 @@ class __EHApi implements _EHApi { bool data, { CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {r'data': data}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio.fetch>( _setStreamType>(Options( method: 'GET', @@ -471,7 +471,7 @@ class __EHApi implements _EHApi { bool? thumb, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = { r'is_nsfw': isNsfw, r'is_ad': isAd, @@ -479,7 +479,7 @@ class __EHApi implements _EHApi { }; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio .fetch>(_setStreamType>>(Options( method: 'GET', @@ -509,11 +509,11 @@ class __EHApi implements _EHApi { String token, { CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio .fetch>(_setStreamType>(Options( method: 'GET', @@ -551,7 +551,7 @@ class __EHApi implements _EHApi { ThumbnailAlign? align, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = { r'max': max, r'width': width, @@ -563,7 +563,7 @@ class __EHApi implements _EHApi { }; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio .fetch>(_setStreamType>>(Options( method: 'GET', @@ -593,11 +593,11 @@ class __EHApi implements _EHApi { int gid, { CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio.fetch>( _setStreamType>(Options( method: 'GET', @@ -633,7 +633,7 @@ class __EHApi implements _EHApi { String? tag, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = { r'all': all, r'offset': offset, @@ -644,7 +644,7 @@ class __EHApi implements _EHApi { }; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio.fetch>( _setStreamType>>(Options( method: 'GET', @@ -679,11 +679,11 @@ class __EHApi implements _EHApi { String id, { CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio .fetch>(_setStreamType>(Options( method: 'GET', @@ -711,11 +711,11 @@ class __EHApi implements _EHApi { @override Future>> getRowTags({CancelToken? cancel}) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio.fetch>( _setStreamType>>(Options( method: 'GET', @@ -753,7 +753,7 @@ class __EHApi implements _EHApi { bool? exportAd, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = { r'jpn_title': jpnTitle, r'max_length': maxLength, @@ -761,7 +761,7 @@ class __EHApi implements _EHApi { }; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio.fetch(_setStreamType>(Options( method: 'GET', @@ -794,7 +794,7 @@ class __EHApi implements _EHApi { String? excludes, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; @@ -854,7 +854,7 @@ class __EHApi implements _EHApi { bool? isAd, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; @@ -908,7 +908,7 @@ class __EHApi implements _EHApi { bool? isAd, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; @@ -960,11 +960,11 @@ class __EHApi implements _EHApi { bool? current, CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {r'current': current}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; - final Map? _data = null; + const Map? _data = null; final _result = await _dio.fetch>(_setStreamType(Options( method: 'GET', @@ -992,7 +992,7 @@ class __EHApi implements _EHApi { ConfigOptional cfg, { CancelToken? cancel, }) async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; diff --git a/lib/api/task.dart b/lib/api/task.dart new file mode 100644 index 0000000..a1142dc --- /dev/null +++ b/lib/api/task.dart @@ -0,0 +1,208 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'task.g.dart'; + +enum TaskType { + @JsonValue(0) + download, + @JsonValue(1) + exportZip, + @JsonValue(2) + updateMeiliSearchData, + @JsonValue(3) + fixGalleryPage, +} + +@JsonSerializable() +class Task { + const Task({ + required this.id, + required this.type, + required this.gid, + required this.token, + required this.pid, + this.details, + }); + final int id; + final TaskType type; + final int gid; + final String token; + final int pid; + final String? details; + factory Task.fromJson(Map json) => _$TaskFromJson(json); + Map toJson() => _$TaskToJson(this); +} + +sealed class TaskProgressBasicType {} + +@JsonSerializable() +class TaskDownloadSingleProgress { + const TaskDownloadSingleProgress({ + required this.index, + required this.token, + required this.name, + required this.width, + required this.height, + required this.isOriginal, + required this.total, + required this.started, + required this.downloaded, + }); + final int index; + final String token; + final String name; + final int width; + final int height; + @JsonKey(name: 'is_original') + final bool isOriginal; + final int total; + @JsonKey(fromJson: _fromJson, toJson: _toJson) + final DateTime started; + final int downloaded; + static DateTime _fromJson(int d) => + DateTime.fromMillisecondsSinceEpoch(d, isUtc: true); + static int _toJson(DateTime d) => d.millisecondsSinceEpoch; + factory TaskDownloadSingleProgress.fromJson(Map json) => + _$TaskDownloadSingleProgressFromJson(json); + Map toJson() => _$TaskDownloadSingleProgressToJson(this); +} + +@JsonSerializable() +class TaskDownloadProgess implements TaskProgressBasicType { + const TaskDownloadProgess({ + required this.downloadedPage, + required this.failedPage, + required this.totalPage, + required this.details, + }); + @JsonKey(name: 'downloaded_page') + final int downloadedPage; + @JsonKey(name: 'failed_page') + final int failedPage; + @JsonKey(name: 'total_page') + final int totalPage; + final List details; + factory TaskDownloadProgess.fromJson(Map json) => + _$TaskDownloadProgessFromJson(json); + Map toJson() => _$TaskDownloadProgessToJson(this); +} + +@JsonSerializable() +class TaskExportZipProgress implements TaskProgressBasicType { + const TaskExportZipProgress({ + required this.addedPage, + required this.totalPage, + }); + @JsonKey(name: 'added_page') + final int addedPage; + @JsonKey(name: 'total_page') + final int totalPage; + factory TaskExportZipProgress.fromJson(Map json) => + _$TaskExportZipProgressFromJson(json); + Map toJson() => _$TaskExportZipProgressToJson(this); +} + +@JsonSerializable() +class TaskUpdateMeiliSearchDataProgress implements TaskProgressBasicType { + const TaskUpdateMeiliSearchDataProgress({ + required this.totalGallery, + required this.updatedGallery, + }); + @JsonKey(name: 'total_gallery') + final int totalGallery; + @JsonKey(name: 'updated_gallery') + final int updatedGallery; + factory TaskUpdateMeiliSearchDataProgress.fromJson( + Map json) => + _$TaskUpdateMeiliSearchDataProgressFromJson(json); + Map toJson() => + _$TaskUpdateMeiliSearchDataProgressToJson(this); +} + +@JsonSerializable() +class TaskFixGalleryPageProgress implements TaskProgressBasicType { + const TaskFixGalleryPageProgress({ + required this.totalGallery, + required this.checkedGallery, + }); + @JsonKey(name: 'total_gallery') + final int totalGallery; + @JsonKey(name: 'checked_gallery') + final int checkedGallery; + factory TaskFixGalleryPageProgress.fromJson(Map json) => + _$TaskFixGalleryPageProgressFromJson(json); + Map toJson() => _$TaskFixGalleryPageProgressToJson(this); +} + +class TaskProgress { + const TaskProgress({ + required this.type, + required this.taskId, + required this.progress, + }); + final TaskType type; + final int taskId; + final TaskProgressBasicType progress; + factory TaskProgress.fromJson(Map json) { + final type = json['type'] as int; + final taskId = json['task_id'] as int; + switch (type) { + case 0: + return TaskProgress( + type: TaskType.download, + taskId: taskId, + progress: TaskDownloadProgess.fromJson( + json['progress'] as Map), + ); + case 1: + return TaskProgress( + type: TaskType.exportZip, + taskId: taskId, + progress: TaskExportZipProgress.fromJson( + json['progress'] as Map), + ); + case 2: + return TaskProgress( + type: TaskType.updateMeiliSearchData, + taskId: taskId, + progress: TaskUpdateMeiliSearchDataProgress.fromJson( + json['progress'] as Map), + ); + case 3: + return TaskProgress( + type: TaskType.fixGalleryPage, + taskId: taskId, + progress: TaskFixGalleryPageProgress.fromJson( + json['progress'] as Map), + ); + default: + throw ArgumentError.value(type, 'type', 'Invalid task type'); + } + } +} + +enum TaskStatus { + @JsonValue(0) + wait, + @JsonValue(1) + running, + @JsonValue(2) + finished, + @JsonValue(3) + failed, +} + +class TaskDetail { + TaskDetail({ + required this.base, + this.progress, + required this.status, + this.error, + this.fataled, + }); + final Task base; + TaskProgressBasicType? progress; + TaskStatus status; + String? error; + bool? fataled; +} diff --git a/lib/api/task.g.dart b/lib/api/task.g.dart new file mode 100644 index 0000000..f16eb98 --- /dev/null +++ b/lib/api/task.g.dart @@ -0,0 +1,122 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'task.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Task _$TaskFromJson(Map json) => Task( + id: json['id'] as int, + type: $enumDecode(_$TaskTypeEnumMap, json['type']), + gid: json['gid'] as int, + token: json['token'] as String, + pid: json['pid'] as int, + details: json['details'] as String?, + ); + +Map _$TaskToJson(Task instance) => { + 'id': instance.id, + 'type': _$TaskTypeEnumMap[instance.type]!, + 'gid': instance.gid, + 'token': instance.token, + 'pid': instance.pid, + 'details': instance.details, + }; + +const _$TaskTypeEnumMap = { + TaskType.download: 0, + TaskType.exportZip: 1, + TaskType.updateMeiliSearchData: 2, + TaskType.fixGalleryPage: 3, +}; + +TaskDownloadSingleProgress _$TaskDownloadSingleProgressFromJson( + Map json) => + TaskDownloadSingleProgress( + index: json['index'] as int, + token: json['token'] as String, + name: json['name'] as String, + width: json['width'] as int, + height: json['height'] as int, + isOriginal: json['is_original'] as bool, + total: json['total'] as int, + started: TaskDownloadSingleProgress._fromJson(json['started'] as int), + downloaded: json['downloaded'] as int, + ); + +Map _$TaskDownloadSingleProgressToJson( + TaskDownloadSingleProgress instance) => + { + 'index': instance.index, + 'token': instance.token, + 'name': instance.name, + 'width': instance.width, + 'height': instance.height, + 'is_original': instance.isOriginal, + 'total': instance.total, + 'started': TaskDownloadSingleProgress._toJson(instance.started), + 'downloaded': instance.downloaded, + }; + +TaskDownloadProgess _$TaskDownloadProgessFromJson(Map json) => + TaskDownloadProgess( + downloadedPage: json['downloaded_page'] as int, + failedPage: json['failed_page'] as int, + totalPage: json['total_page'] as int, + details: (json['details'] as List) + .map((e) => + TaskDownloadSingleProgress.fromJson(e as Map)) + .toList(), + ); + +Map _$TaskDownloadProgessToJson( + TaskDownloadProgess instance) => + { + 'downloaded_page': instance.downloadedPage, + 'failed_page': instance.failedPage, + 'total_page': instance.totalPage, + 'details': instance.details, + }; + +TaskExportZipProgress _$TaskExportZipProgressFromJson( + Map json) => + TaskExportZipProgress( + addedPage: json['added_page'] as int, + totalPage: json['total_page'] as int, + ); + +Map _$TaskExportZipProgressToJson( + TaskExportZipProgress instance) => + { + 'added_page': instance.addedPage, + 'total_page': instance.totalPage, + }; + +TaskUpdateMeiliSearchDataProgress _$TaskUpdateMeiliSearchDataProgressFromJson( + Map json) => + TaskUpdateMeiliSearchDataProgress( + totalGallery: json['total_gallery'] as int, + updatedGallery: json['updated_gallery'] as int, + ); + +Map _$TaskUpdateMeiliSearchDataProgressToJson( + TaskUpdateMeiliSearchDataProgress instance) => + { + 'total_gallery': instance.totalGallery, + 'updated_gallery': instance.updatedGallery, + }; + +TaskFixGalleryPageProgress _$TaskFixGalleryPageProgressFromJson( + Map json) => + TaskFixGalleryPageProgress( + totalGallery: json['total_gallery'] as int, + checkedGallery: json['checked_gallery'] as int, + ); + +Map _$TaskFixGalleryPageProgressToJson( + TaskFixGalleryPageProgress instance) => + { + 'total_gallery': instance.totalGallery, + 'checked_gallery': instance.checkedGallery, + }; diff --git a/lib/components/fit_text.dart b/lib/components/fit_text.dart index 536c6ba..55f2bec 100644 --- a/lib/components/fit_text.dart +++ b/lib/components/fit_text.dart @@ -2,11 +2,11 @@ import "package:flutter/material.dart"; class FitText extends StatelessWidget { const FitText({ - Key? key, + super.key, required this.texts, this.style, this.separator = " ", - }) : super(key: key); + }); final List<(String, int)> texts; final TextStyle? style; final String separator; diff --git a/lib/components/gallery_basic_info.dart b/lib/components/gallery_basic_info.dart index 81f1c35..99f9147 100644 --- a/lib/components/gallery_basic_info.dart +++ b/lib/components/gallery_basic_info.dart @@ -8,8 +8,7 @@ import '../viewer/single.dart'; class GalleryBasicInfo extends StatelessWidget { const GalleryBasicInfo(this.gMeta, this.firstPage, - {Key? key, this.fileId, this.gData, this.files}) - : super(key: key); + {super.key, this.fileId, this.gData, this.files}); final GMeta gMeta; final ExtendedPMeta firstPage; final int? fileId; diff --git a/lib/components/gallery_info.dart b/lib/components/gallery_info.dart index a424431..19ac3a5 100644 --- a/lib/components/gallery_info.dart +++ b/lib/components/gallery_info.dart @@ -10,7 +10,7 @@ import 'tags.dart'; import 'thumbnail_gridview.dart'; class GalleryInfo extends StatefulWidget { - const GalleryInfo(this.gData, {Key? key, this.files}) : super(key: key); + const GalleryInfo(this.gData, {super.key, this.files}); final GalleryData gData; final EhFiles? files; diff --git a/lib/components/gallery_info_desktop.dart b/lib/components/gallery_info_desktop.dart index 2bbefe6..0f263a7 100644 --- a/lib/components/gallery_info_desktop.dart +++ b/lib/components/gallery_info_desktop.dart @@ -13,8 +13,7 @@ import '../viewer/single.dart'; class _KeyValue extends StatelessWidget { const _KeyValue(this.name, this.value, - {Key? key, this.maxLines, this.minLines, this.fontSize}) - : super(key: key); + {this.maxLines, this.minLines, this.fontSize}); final String name; final String value; final int? maxLines; @@ -41,8 +40,7 @@ class _KeyValue extends StatelessWidget { class GalleryInfoDesktop extends StatelessWidget { const GalleryInfoDesktop(this.gData, - {Key? key, this.fileId, this.controller, this.files}) - : super(key: key); + {super.key, this.fileId, this.controller, this.files}); final GalleryData gData; final int? fileId; final ScrollController? controller; diff --git a/lib/components/gallery_info_detail.dart b/lib/components/gallery_info_detail.dart index 8bdfc88..dd89446 100644 --- a/lib/components/gallery_info_detail.dart +++ b/lib/components/gallery_info_detail.dart @@ -9,7 +9,7 @@ import '../utils/filesize.dart'; import 'rate.dart'; class GalleryInfoDetail extends StatelessWidget { - const GalleryInfoDetail(this.meta, {Key? key}) : super(key: key); + const GalleryInfoDetail(this.meta, {super.key}); final GMeta meta; @override diff --git a/lib/components/image.dart b/lib/components/image.dart index 3938292..70e36a4 100644 --- a/lib/components/image.dart +++ b/lib/components/image.dart @@ -10,7 +10,7 @@ final _log = Logger("ImageWithContextMenu"); class ImageWithContextMenu extends StatelessWidget { const ImageWithContextMenu(this.data, - {Key? key, + {super.key, this.uri, this.dir, this.fileName, @@ -18,8 +18,7 @@ class ImageWithContextMenu extends StatelessWidget { this.isNsfw, this.changeNsfw, this.isAd, - this.changeAd}) - : super(key: key); + this.changeAd}); final Uint8List data; final String? uri; final ImageFmt fmt; diff --git a/lib/components/labeled_checkbox.dart b/lib/components/labeled_checkbox.dart index 54f41b6..8f6a10b 100644 --- a/lib/components/labeled_checkbox.dart +++ b/lib/components/labeled_checkbox.dart @@ -2,11 +2,11 @@ import 'package:flutter/material.dart'; class LabeledCheckbox extends StatelessWidget { const LabeledCheckbox({ - Key? key, + super.key, required this.label, required this.value, required this.onChanged, - }) : super(key: key); + }); final Text label; final bool value; diff --git a/lib/components/number_field.dart b/lib/components/number_field.dart index b650937..e72774f 100644 --- a/lib/components/number_field.dart +++ b/lib/components/number_field.dart @@ -4,14 +4,13 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class NumberFormField extends StatelessWidget { const NumberFormField( - {Key? key, + {super.key, this.min, this.max, this.initialValue, this.errorMsg, this.decoration, - this.onChanged}) - : super(key: key); + this.onChanged}); final int? min; final int? max; diff --git a/lib/components/rate.dart b/lib/components/rate.dart index f5663e7..d522153 100644 --- a/lib/components/rate.dart +++ b/lib/components/rate.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; class Rate extends StatelessWidget { - const Rate(this.rate, {Key? key, this.fontSize}) : super(key: key); + const Rate(this.rate, {super.key, this.fontSize}); final double rate; final double? fontSize; diff --git a/lib/components/scroll_parent.dart b/lib/components/scroll_parent.dart index 725da27..0007e4d 100644 --- a/lib/components/scroll_parent.dart +++ b/lib/components/scroll_parent.dart @@ -4,8 +4,7 @@ class ScrollParent extends StatelessWidget { final ScrollController controller; final Widget child; - const ScrollParent({Key? key, required this.controller, required this.child}) - : super(key: key); + const ScrollParent({super.key, required this.controller, required this.child}); @override Widget build(BuildContext context) { diff --git a/lib/components/string_list_field.dart b/lib/components/string_list_field.dart index b44d85a..f314d41 100644 --- a/lib/components/string_list_field.dart +++ b/lib/components/string_list_field.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class StringListFormField extends StatefulWidget { const StringListFormField( - {Key? key, + {super.key, this.initialValue, this.onChanged, this.decoration, @@ -12,8 +12,7 @@ class StringListFormField extends StatefulWidget { this.autovalidateMode, this.label, this.helper, - this.constraints}) - : super(key: key); + this.constraints}); final List? initialValue; final ValueChanged>? onChanged; final InputDecoration? decoration; diff --git a/lib/components/string_map_field.dart b/lib/components/string_map_field.dart index 01ba811..1d42c20 100644 --- a/lib/components/string_map_field.dart +++ b/lib/components/string_map_field.dart @@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class StringMapFormField extends StatefulWidget { const StringMapFormField( - {Key? key, + {super.key, this.initialValue, this.onChanged, this.keyDecoration, @@ -18,8 +18,7 @@ class StringMapFormField extends StatefulWidget { this.valueAutovalidateMode, this.label, this.helper, - this.constraints}) - : super(key: key); + this.constraints}); final Map? initialValue; final ValueChanged>? onChanged; final InputDecoration? keyDecoration; diff --git a/lib/components/tag.dart b/lib/components/tag.dart index 96d2ff3..8c86d96 100644 --- a/lib/components/tag.dart +++ b/lib/components/tag.dart @@ -4,7 +4,7 @@ import '../api/gallery.dart'; import '../globals.dart'; class TagWidget extends StatelessWidget { - const TagWidget(this.tag, {Key? key, this.name}) : super(key: key); + const TagWidget(this.tag, {super.key, this.name}); final Tag tag; final String? name; diff --git a/lib/components/tag_tooltip.dart b/lib/components/tag_tooltip.dart index b9934fe..59cf67a 100644 --- a/lib/components/tag_tooltip.dart +++ b/lib/components/tag_tooltip.dart @@ -10,7 +10,7 @@ String _getTag(Tag tag) { } class TagTooltip extends StatelessWidget { - const TagTooltip(this.tag, {Key? key}) : super(key: key); + const TagTooltip(this.tag, {super.key}); final Tag tag; @override diff --git a/lib/components/tags.dart b/lib/components/tags.dart index e7e3eea..a7c39f3 100644 --- a/lib/components/tags.dart +++ b/lib/components/tags.dart @@ -11,8 +11,7 @@ import 'scroll_parent.dart'; class TagsPanel extends StatefulWidget { const TagsPanel(this.tags, - {Key? key, this.controller, this.sliver, this.margin}) - : super(key: key); + {super.key, this.controller, this.sliver, this.margin}); final List tags; final ScrollController? controller; final bool? sliver; diff --git a/lib/components/thumbnail.dart b/lib/components/thumbnail.dart index aa1eb59..773a3b5 100644 --- a/lib/components/thumbnail.dart +++ b/lib/components/thumbnail.dart @@ -20,7 +20,7 @@ final _log = Logger("Thumbnail"); class Thumbnail extends StatefulWidget { const Thumbnail(ExtendedPMeta pMeta, - {Key? key, + {super.key, int? max, int? width, int? height, @@ -33,8 +33,7 @@ class Thumbnail extends StatefulWidget { _max = max ?? 1200, _width = width, _height = height, - _fileId = fileId, - super(key: key); + _fileId = fileId; final ExtendedPMeta _pMeta; final int _max; final int? _width; diff --git a/lib/components/thumbnail_gridview.dart b/lib/components/thumbnail_gridview.dart index aa5b472..54c9b53 100644 --- a/lib/components/thumbnail_gridview.dart +++ b/lib/components/thumbnail_gridview.dart @@ -6,8 +6,7 @@ import 'thumbnail.dart'; class ThumbnailGridView extends StatelessWidget { const ThumbnailGridView(this.gdata, this.gridDelegate, - {Key? key, this.files, this.gid}) - : super(key: key); + {super.key, this.files, this.gid}); final GalleryData gdata; final int? gid; final EhFiles? files; diff --git a/lib/create_root_user.dart b/lib/create_root_user.dart index 8e129a0..d5908be 100644 --- a/lib/create_root_user.dart +++ b/lib/create_root_user.dart @@ -9,7 +9,7 @@ import 'login.dart'; final _log = Logger("CreateRootUserPage"); class CreateRootUserPage extends StatefulWidget { - const CreateRootUserPage({Key? key}) : super(key: key); + const CreateRootUserPage({super.key}); static const String routeName = '/create_root_user'; diff --git a/lib/dialog/download_zip_page.dart b/lib/dialog/download_zip_page.dart index 4cf1627..3f7729b 100644 --- a/lib/dialog/download_zip_page.dart +++ b/lib/dialog/download_zip_page.dart @@ -10,7 +10,7 @@ import '../utils/download_zip.dart'; final _log = Logger("DownloadZipPage"); class DownloadZipPage extends StatefulWidget { - const DownloadZipPage(this.gid, {Key? key}) : super(key: key); + const DownloadZipPage(this.gid, {super.key}); final int gid; @override diff --git a/lib/dialog/gallery_details_page.dart b/lib/dialog/gallery_details_page.dart index 0ffcf69..9e870d0 100644 --- a/lib/dialog/gallery_details_page.dart +++ b/lib/dialog/gallery_details_page.dart @@ -9,8 +9,7 @@ import '../globals.dart'; final _log = Logger("GalleryDetailsPage"); class _KeyValue extends StatelessWidget { - const _KeyValue(this.name, this.value, {Key? key, this.fontSize}) - : super(key: key); + const _KeyValue(this.name, this.value, {this.fontSize}); final String name; final String value; final double? fontSize; @@ -39,7 +38,7 @@ class GalleryDetailsPageExtra { } class GalleryDetailsPage extends StatefulWidget { - const GalleryDetailsPage(this.gid, {Key? key, this.meta}) : super(key: key); + const GalleryDetailsPage(this.gid, {super.key, this.meta}); final int gid; final GMeta? meta; diff --git a/lib/galleries.dart b/lib/galleries.dart index f406048..e3fc2ef 100644 --- a/lib/galleries.dart +++ b/lib/galleries.dart @@ -17,8 +17,7 @@ class GalleriesPageExtra { class GalleriesPage extends StatefulWidget { const GalleriesPage( - {Key? key, this.sortByGid, this.uploader, this.tag, this.translatedTag}) - : super(key: key); + {super.key, this.sortByGid, this.uploader, this.tag, this.translatedTag}); final SortByGid? sortByGid; final String? uploader; final String? tag; diff --git a/lib/gallery.dart b/lib/gallery.dart index 9e98e7a..b77b13a 100644 --- a/lib/gallery.dart +++ b/lib/gallery.dart @@ -17,9 +17,8 @@ class GalleryPageExtra { } class GalleryPage extends StatefulWidget { - const GalleryPage(int gid, {Key? key, this.title}) - : _gid = gid, - super(key: key); + const GalleryPage(int gid, {super.key, this.title}) + : _gid = gid; final int _gid; final String? title; diff --git a/lib/globals.dart b/lib/globals.dart index 2972358..ac3d52e 100644 --- a/lib/globals.dart +++ b/lib/globals.dart @@ -25,6 +25,7 @@ import 'platform/get_jar.dart'; import 'platform/path.dart'; import 'platform/set_title.dart'; import 'tags.dart'; +import 'task.dart'; import 'utils.dart'; export 'galleries.dart' show GalleriesPageExtra; export 'gallery.dart' show GalleryPageExtra; @@ -108,6 +109,7 @@ final Clipboard platformClipboard = Clipboard(); final Display platformDisplay = Display(); final Path platformPath = Path(); final TagsInfo tags = TagsInfo(); +final TaskManager tasks = TaskManager(); final GlobalKey rootScaffoldMessengerKey = GlobalKey(); final EventListener listener = EventListener()..maxListeners = 0; @@ -313,6 +315,7 @@ final _authLog = Logger("AuthLog"); void clearAllStates(BuildContext context) { auth.clear(); tags.clear(); + tasks.clear(); checkAuth(context); } diff --git a/lib/home.dart b/lib/home.dart index 353ff4a..c4d41a1 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -9,7 +9,7 @@ import 'main.dart'; final _log = Logger("HomePage"); class HomeDrawer extends StatelessWidget { - const HomeDrawer({Key? key}) : super(key: key); + const HomeDrawer({super.key}); @override Widget build(BuildContext context) { @@ -56,7 +56,7 @@ class HomeDrawer extends StatelessWidget { } class HomePage extends HookWidget { - const HomePage({Key? key}) : super(key: key); + const HomePage({super.key}); static const String routeName = '/'; diff --git a/lib/login.dart b/lib/login.dart index 17a406f..5d1bd4e 100644 --- a/lib/login.dart +++ b/lib/login.dart @@ -9,7 +9,7 @@ import 'platform/device.dart'; final _log = Logger("LoginPage"); class LoginPage extends StatefulWidget { - const LoginPage({Key? key}) : super(key: key); + const LoginPage({super.key}); static const String routeName = '/login'; diff --git a/lib/main.dart b/lib/main.dart index 67f25a0..5c026e2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -247,8 +247,8 @@ class _MainApp extends State { _log.warning("Failed to read lang from prefs:", e); } if (isWindows) { - _themeData = _themeData.useSystemChineseFont(); - _darkThemeData = _darkThemeData.useSystemChineseFont(); + _themeData = _themeData.useSystemChineseFont(Brightness.light); + _darkThemeData = _darkThemeData.useSystemChineseFont(Brightness.dark); } } diff --git a/lib/server_settings.dart b/lib/server_settings.dart index a5f4b7f..1f86ce6 100644 --- a/lib/server_settings.dart +++ b/lib/server_settings.dart @@ -15,7 +15,7 @@ import 'platform/ua.dart'; final _log = Logger("ServerSettingsPage"); class ServerSettingsPage extends StatefulWidget { - const ServerSettingsPage({Key? key}) : super(key: key); + const ServerSettingsPage({super.key}); static get routeName => "/server_settings"; @override diff --git a/lib/set_server.dart b/lib/set_server.dart index 7ac3d0a..bac1c1a 100644 --- a/lib/set_server.dart +++ b/lib/set_server.dart @@ -8,7 +8,7 @@ import 'globals.dart'; final _log = Logger("SetServerPage"); class SetServerPage extends StatefulWidget { - const SetServerPage({Key? key}) : super(key: key); + const SetServerPage({super.key}); static const String routeName = '/set_server'; diff --git a/lib/settings.dart b/lib/settings.dart index 2846e95..dbce931 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -9,7 +9,7 @@ import 'utils.dart'; final _log = Logger("SettingsPage"); class SettingsPage extends StatefulWidget { - const SettingsPage({Key? key}) : super(key: key); + const SettingsPage({super.key}); static const String routeName = '/settings'; diff --git a/lib/task.dart b/lib/task.dart new file mode 100644 index 0000000..be647b2 --- /dev/null +++ b/lib/task.dart @@ -0,0 +1,8 @@ +import 'api/task.dart'; + +class TaskManager { + Map tasks = {}; + void clear() { + tasks.clear(); + } +} diff --git a/lib/utils/clipboard.dart b/lib/utils/clipboard.dart index 3f77003..eb93e38 100644 --- a/lib/utils/clipboard.dart +++ b/lib/utils/clipboard.dart @@ -38,11 +38,11 @@ Future copyImageToClipboard(Uint8List data, ImageFmt fmt) async { ? Formats.gif(data) : Formats.png(fmt == ImageFmt.jpg ? await jpgToPng(data) : data)); } - await ClipboardWriter.instance.write([item]); + await SystemClipboard.instance!.write([item]); } Future copyTextToClipboard(String text) async { final item = DataWriterItem(); item.add(Formats.plainText(text)); - await ClipboardWriter.instance.write([item]); + await SystemClipboard.instance!.write([item]); } diff --git a/lib/viewer/single.dart b/lib/viewer/single.dart index 4ab5528..ef054e2 100644 --- a/lib/viewer/single.dart +++ b/lib/viewer/single.dart @@ -27,8 +27,7 @@ class SinglePageViewerExtra { class SinglePageViewer extends StatefulWidget { const SinglePageViewer( - {Key? key, required this.gid, required this.index, this.data, this.files}) - : super(key: key); + {super.key, required this.gid, required this.index, this.data, this.files}); final GalleryData? data; final EhFiles? files; final int gid; diff --git a/pubspec.lock b/pubspec.lock index 7ee88a7..03f6443 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: archive - sha256: e0902a06f0e00414e4e3438a084580161279f137aeb862274710f29ec10cf01e + sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" url: "https://pub.dev" source: hosted - version: "3.3.9" + version: "3.4.10" args: dependency: transitive description: @@ -69,34 +69,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: d912852cce27c9e80a93603db721c267716894462e7033165178b91138587972 + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.8" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.3.0" built_collection: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: built_value - sha256: ff627b645b28fb8bdb69e645f910c2458fd6b65f6585c3a53e0626024897dedf + sha256: a3ec2e0f967bc47f69f95009bb93db936288d61d5343b9436e378b28a2f830c6 url: "https://pub.dev" source: hosted - version: "8.6.2" + version: "8.9.0" characters: dependency: transitive description: @@ -133,10 +133,10 @@ packages: dependency: "direct main" description: name: chinese_font_library - sha256: aec5b5ab290c873251a9f7772b2101a851f4f87bf3b544b515a864de569ebcc0 + sha256: "2a432695b8a8fec63dad9547f64aa88260ca8f9481e02701c92dc189f090fafe" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" clock: dependency: transitive description: @@ -149,10 +149,10 @@ packages: dependency: transitive description: name: code_builder - sha256: "315a598c7fbe77f22de1c9da7cfd6fd21816312f16ffa124453b4fc679e540f1" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.6.0" + version: "4.10.0" collection: dependency: transitive description: @@ -190,34 +190,34 @@ packages: dependency: "direct main" description: name: cryptography - sha256: "11d083541666d80bba21190d35ff70b2497c81e064e82d1b8a07d801f7c7e282" + sha256: d146b76d33d94548cf035233fbc2f4338c1242fa119013bead807d033fc4ae05 url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.7.0" cryptography_flutter: dependency: "direct main" description: name: cryptography_flutter - sha256: "423ac095bbc4650fe6c07c64632ddc5dda1d4851241367efa0f26ca24b0ce480" + sha256: a7fc3f0de42fb0947cbf213257aa3a69c89df561d104723ede8050658621f292 url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" dart_style: dependency: transitive description: name: dart_style - sha256: abd7625e16f51f554ea244d090292945ec4d4be7bfbaf2ec8cccea568919d334 + sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.4" device_info_plus: dependency: transitive description: name: device_info_plus - sha256: "86add5ef97215562d2e090535b0a16f197902b10c369c558a100e74ea06e8659" + sha256: "77f757b789ff68e4eaf9c56d1752309bd9f7ad557cb105b938a7f8eb89e59110" url: "https://pub.dev" source: hosted - version: "9.0.3" + version: "9.1.2" device_info_plus_platform_interface: dependency: transitive description: @@ -230,18 +230,18 @@ packages: dependency: "direct main" description: name: dio - sha256: ce75a1b40947fea0a0e16ce73337122a86762e38b982e1ccb909daa3b9bc4197 + sha256: "797e1e341c3dd2f69f2dad42564a6feff3bfb87187d05abb93b9609e6f1645c3" url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.4.0" dio_cookie_manager: dependency: "direct main" description: name: dio_cookie_manager - sha256: "884b1099cba70a83751969d318084577c29de148600ffb7d4796f752d2cade02" + sha256: e79498b0f632897ff0c28d6e8178b4bc6e9087412401f618c31fa0904ace050d url: "https://pub.dev" source: hosted - version: "3.1.0+1" + version: "3.1.1" dio_image_provider: dependency: "direct main" description: @@ -286,10 +286,10 @@ packages: dependency: "direct main" description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -307,18 +307,18 @@ packages: dependency: "direct main" description: name: flutter_hooks - sha256: "6ae13b1145c589112cbd5c4fda6c65908993a9cb18d4f82042e9c28dd9fbf611" + sha256: cde36b12f7188c85286fba9b38cc5a902e7279f36dd676967106c041dc9dde70 url: "https://pub.dev" source: hosted - version: "0.20.1" + version: "0.20.5" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "3.0.1" flutter_localizations: dependency: "direct main" description: flutter @@ -328,10 +328,10 @@ packages: dependency: transitive description: name: flutter_markdown - sha256: "35108526a233cc0755664d445f8a6b4b61e6f8fe993b3658b80b4a26827fc196" + sha256: "30088ce826b5b9cfbf9e8bece34c716c8a59fa54461dcae1e4ac01a94639e762" url: "https://pub.dev" source: hosted - version: "0.6.18+2" + version: "0.6.18+3" flutter_staggered_grid_view: dependency: transitive description: @@ -370,10 +370,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: c247a4f76071c3b97bb5ae8912968870d5565644801c5e09f3bc961b4d874895 + sha256: "07ee2436909f749d606f53521dc1725dd738dc5196e5ff815bc254253c594075" url: "https://pub.dev" source: hosted - version: "12.1.1" + version: "13.1.0" graphs: dependency: transitive description: @@ -386,10 +386,10 @@ packages: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" http_multi_server: dependency: transitive description: @@ -410,10 +410,10 @@ packages: dependency: "direct main" description: name: image - sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf + sha256: "49a0d4b0c12402853d3f227fe7c315601b238d126aa4caa5dbb2dcf99421aa4a" url: "https://pub.dev" source: hosted - version: "4.0.17" + version: "4.1.6" infinite_scroll_pagination: dependency: "direct main" description: @@ -442,18 +442,18 @@ packages: dependency: transitive description: name: irondash_engine_context - sha256: fea21bff36d44a5955beba90619f54b9169884014128ae75f50eba2db03c24a0 + sha256: "294a0e21c4358ff17264e6b811c615b664cebb33b49ad2ddb54f8110e7714510" url: "https://pub.dev" source: hosted - version: "0.3.1" + version: "0.5.1" irondash_message_channel: dependency: transitive description: name: irondash_message_channel - sha256: "500daa1fbe679f7d28a5258df3ff47dab6de352e680dc93c1ca9eae1555d8db5" + sha256: "131d64d97a3612bc3617aefc878f3e3a8e23e0ce18b3bba8e78cb1930befcec1" url: "https://pub.dev" source: hosted - version: "0.3.1" + version: "0.5.0" js: dependency: transitive description: @@ -490,10 +490,10 @@ packages: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.0.0" logging: dependency: "direct main" description: @@ -506,10 +506,10 @@ packages: dependency: transitive description: name: markdown - sha256: acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd + sha256: "1b134d9f8ff2da15cb298efe6cd8b7d2a78958c1b00384ebcbdf13fe340a6c90" url: "https://pub.dev" source: hosted - version: "7.1.1" + version: "7.2.1" matcher: dependency: transitive description: @@ -538,10 +538,10 @@ packages: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" package_config: dependency: transitive description: @@ -586,26 +586,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.2" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" path_provider_linux: dependency: transitive description: @@ -618,10 +618,10 @@ packages: dependency: transitive description: name: path_provider_platform_interface - sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_windows: dependency: transitive description: @@ -634,10 +634,10 @@ packages: dependency: transitive description: name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.0.2" photo_view: dependency: "direct main" description: @@ -650,34 +650,34 @@ packages: dependency: transitive description: name: pixel_snap - sha256: "5de3662b926c9bc189578cf90f9d5b350ee61bc8e20e8a91fa1dfdd26c9f5ece" + sha256: d31591a4f4aa8ed5dc6fc00b8d027338a5614dfbf5ca658b69d1faa7aba80af7 url: "https://pub.dev" source: hosted - version: "0.1.2" + version: "0.1.4" platform: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.6" + version: "2.1.8" pointycastle: dependency: transitive description: name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" url: "https://pub.dev" source: hosted - version: "3.7.3" + version: "3.7.4" pool: dependency: transitive description: @@ -686,6 +686,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.dev" + source: hosted + version: "3.1.0" pub_semver: dependency: transitive description: @@ -706,18 +714,18 @@ packages: dependency: "direct main" description: name: retrofit - sha256: "5eedbd8f73697f190dabc88520e0bcf2d3b2d9b9ad5c837f1dbb3ee6172d7709" + sha256: "13a2865c0d97da580ea4e3c64d412d81f365fd5b26be2a18fca9582e021da37a" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.1.0" retrofit_generator: dependency: "direct dev" description: name: retrofit_generator - sha256: "9499eb46b3657a62192ddbc208ff7e6c6b768b19e83c1ee6f6b119c864b99690" + sha256: a962be21403c2ecdd82d06c863340cff759642ae6ecac5a2c74a9a60377592c3 url: "https://pub.dev" source: hosted - version: "7.0.8" + version: "8.1.0" screen_retriever: dependency: transitive description: @@ -730,10 +738,10 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac + sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.2" shared_preferences_android: dependency: transitive description: @@ -746,42 +754,42 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" + sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.3.5" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: c2eb5bf57a2fe9ad6988121609e47d3e07bb3bdca5b6f8444e4cf302428a128a + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a + sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: f763a101313bd3be87edffe0560037500967de9c394a714cd598d945517f694f + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" shelf: dependency: transitive description: @@ -815,10 +823,10 @@ packages: dependency: transitive description: name: source_gen - sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" source_helper: dependency: transitive description: @@ -835,6 +843,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -871,26 +887,26 @@ packages: dependency: "direct main" description: name: super_clipboard - sha256: "548642d62d691d2ba00850efe0f7a11ce5696e59111658abd4c6cb76b49aa61d" + sha256: "77f044320934386e0b7a3911e05312426d7f33deb6e8cdb28886663430b0e5b0" url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.8.4" super_context_menu: dependency: "direct main" description: name: super_context_menu - sha256: "18736520541aee293720597b399ecfd18e7be16cc2dba72e7dee0edfa5925857" + sha256: e4887211f8d14e25a5f472d1a6351798e13e887e986403d853e5df93b80f8939 url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.8.4" super_native_extensions: dependency: transitive description: name: super_native_extensions - sha256: "3bbb95899f848617b819eec1fa00c80a617f1bd469a480b1f0c4dd383da4c5ec" + sha256: "4699f5b00320290475953c914f823a8b44e10ed8c1e38ce5c8e8426336d11c15" url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.8.4" term_glyph: dependency: transitive description: @@ -951,18 +967,18 @@ packages: dependency: "direct main" description: name: user_agent_analyzer - sha256: "19f8099f09e4800c3f58601c053db66592e8cd6e6a34ab3b9c21a51e0e245e28" + sha256: a7139032a89948ab933a0c1d3b53b99766af2631d96b5c14b518097b0ee5fd4b url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.0" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.3.3" vector_math: dependency: transitive description: @@ -988,7 +1004,7 @@ packages: source: hosted version: "0.3.0" web_socket_channel: - dependency: transitive + dependency: "direct main" description: name: web_socket_channel sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b @@ -999,42 +1015,42 @@ packages: dependency: transitive description: name: win32 - sha256: "9e82a402b7f3d518fb9c02d0e9ae45952df31b9bf34d77baf19da2de03fc2aaa" + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" url: "https://pub.dev" source: hosted - version: "5.0.7" + version: "5.2.0" win32_registry: dependency: transitive description: name: win32_registry - sha256: e4506d60b7244251bc59df15656a3093501c37fb5af02105a944d73eb95be4c9 + sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" window_manager: dependency: "direct main" description: name: window_manager - sha256: "6ee795be9124f90660ea9d05e581a466de19e1c89ee74fc4bf528f60c8600edd" + sha256: b3c895bdf936c77b83c5254bec2e6b3f066710c1f89c38b20b8acc382b525494 url: "https://pub.dev" source: hosted - version: "0.3.6" + version: "0.3.8" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" xml: dependency: transitive description: name: xml - sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.5.0" yaml: dependency: transitive description: @@ -1045,4 +1061,4 @@ packages: version: "3.1.2" sdks: dart: ">=3.2.0 <4.0.0" - flutter: ">=3.13.0" + flutter: ">=3.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0fc847d..6003abf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: dio_image_provider: any enum_flag: ^1.0.2 event_listener: ^0.2.0 - file: ^6.1.4 + file: ^7.0.0 flutter: sdk: flutter flutter_hooks: ^0.20.0 @@ -23,7 +23,7 @@ dependencies: sdk: flutter flutter_web_plugins: sdk: flutter - go_router: ^12.1.0 + go_router: ^13.1.0 image: ^4.0.17 infinite_scroll_pagination: ^4.0.0 intl: any @@ -37,10 +37,11 @@ dependencies: photo_view: ^0.14.0 retrofit: ^4.0.1 shared_preferences: ^2.2.0 - super_clipboard: ^0.6.4 - super_context_menu: ^0.6.4 + super_clipboard: ^0.8.4 + super_context_menu: ^0.8.4 ua_parser_js: ^1.0.1 user_agent_analyzer: ^5.0.0 + web_socket_channel: ^2.4.0 window_manager: ^0.3.6 dependency_overrides: @@ -53,9 +54,9 @@ dependency_overrides: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^3.0.1 build_runner: ^2.4.6 - retrofit_generator: ^7.0.8 + retrofit_generator: ^8.1.0 json_serializable: ^6.7.1 flutter: