mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-20 10:52:05 +00:00
Merge branch 'temp/optimize' into optimize
This commit is contained in:
commit
479a89042e
50 changed files with 935 additions and 890 deletions
|
|
@ -1,9 +1,10 @@
|
|||
PODS:
|
||||
- app_links (0.0.2):
|
||||
- Flutter
|
||||
- audio_session (0.0.1):
|
||||
- Flutter
|
||||
- connectivity_plus (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- DKImagePickerController/Core (4.3.4):
|
||||
- DKImagePickerController/ImageDataManager
|
||||
- DKImagePickerController/Resource
|
||||
|
|
@ -95,8 +96,9 @@ PODS:
|
|||
- FlutterMacOS
|
||||
|
||||
DEPENDENCIES:
|
||||
- app_links (from `.symlinks/plugins/app_links/ios`)
|
||||
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
|
||||
|
|
@ -129,10 +131,12 @@ SPEC REPOS:
|
|||
- SwiftyGif
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
app_links:
|
||||
:path: ".symlinks/plugins/app_links/ios"
|
||||
audio_session:
|
||||
:path: ".symlinks/plugins/audio_session/ios"
|
||||
connectivity_plus:
|
||||
:path: ".symlinks/plugins/connectivity_plus/darwin"
|
||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||
file_picker:
|
||||
:path: ".symlinks/plugins/file_picker/ios"
|
||||
Flutter:
|
||||
|
|
@ -179,8 +183,9 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
app_links: 76b66b60cc809390ca1ad69bfd66b998d2387ac7
|
||||
audio_session: f08db0697111ac84ba46191b55488c0563bb29c6
|
||||
connectivity_plus: 2256d3e20624a7749ed21653aafe291a46446fee
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||
file_picker: 9b3292d7c8bc68c8a7bf8eb78f730e49c8efc517
|
||||
|
|
@ -205,7 +210,7 @@ SPEC CHECKSUMS:
|
|||
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
||||
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
|
||||
video_player_avfoundation: 2cef49524dd1f16c5300b9cd6efd9611ce03639b
|
||||
volume_controller: ca1cde542ee70fad77d388f82e9616488110942b
|
||||
volume_controller: 3657a1f65bedb98fa41ff7dc5793537919f31b12
|
||||
wakelock_plus: 04623e3f525556020ebd4034310f20fe7fda8b49
|
||||
webview_flutter_wkwebview: 44d4dee7d7056d5ad185d25b38404436d56c547c
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
enableGPUValidationMode = "1"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ final List<String> _dateFormats = [
|
|||
"MMM dd,yyyy",
|
||||
];
|
||||
|
||||
void botToast(
|
||||
void Function() botToast(
|
||||
String title, {
|
||||
int second = 10,
|
||||
double? fontSize,
|
||||
|
|
@ -818,20 +818,33 @@ void botToast(
|
|||
double alignY = 0.99,
|
||||
bool hasCloudFlare = false,
|
||||
String? url,
|
||||
int animationDuration = 200,
|
||||
List<DismissDirection> dismissDirections = const [
|
||||
DismissDirection.horizontal,
|
||||
DismissDirection.down,
|
||||
],
|
||||
bool onlyOne = true,
|
||||
bool? themeDark,
|
||||
}) {
|
||||
final context = navigatorKey.currentState?.context;
|
||||
final assets = [
|
||||
'assets/app_icons/icon-black.png',
|
||||
'assets/app_icons/icon-red.png',
|
||||
];
|
||||
BotToast.showNotification(
|
||||
onlyOne: true,
|
||||
dismissDirections: [DismissDirection.horizontal, DismissDirection.down],
|
||||
return BotToast.showNotification(
|
||||
onlyOne: onlyOne,
|
||||
dismissDirections: dismissDirections,
|
||||
align: Alignment(alignX, alignY),
|
||||
duration: Duration(seconds: second),
|
||||
animationDuration: const Duration(milliseconds: 200),
|
||||
animationReverseDuration: const Duration(milliseconds: 200),
|
||||
leading: (_) => Image.asset((assets..shuffle()).first, height: 25),
|
||||
animationDuration: Duration(milliseconds: animationDuration),
|
||||
animationReverseDuration: Duration(milliseconds: animationDuration),
|
||||
leading:
|
||||
(_) => Image.asset(
|
||||
(themeDark == null
|
||||
? (assets..shuffle()).first
|
||||
: assets[themeDark ? 0 : 1]),
|
||||
height: 25,
|
||||
),
|
||||
title: (_) => Text(title, style: TextStyle(fontSize: fontSize)),
|
||||
trailing:
|
||||
hasCloudFlare
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "مهلة زر",
|
||||
"fullscreen": "شاشة كاملة",
|
||||
"update_library": "تحديث المكتبة",
|
||||
"updating_library": "جاري تحديث المكتبة",
|
||||
"updating_library": "جاري تحديث المكتبة ({max} / {cur}) - فشل: {failed}",
|
||||
"next_chapter": "الفصل التالي",
|
||||
"next_5_chapters": "الفصول الخمسة التالية",
|
||||
"next_10_chapters": "الفصول العشرة التالية",
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@
|
|||
"skip_ending": "Ending überspringen",
|
||||
"fullscreen": "Vollbild",
|
||||
"update_library": "Bibliothek aktualisieren",
|
||||
"updating_library": "Bibliothek wird aktualisiert",
|
||||
"updating_library": "Bibliothek wird aktualisiert ({cur} / {max}) - Fehlgeschlagen: {failed}",
|
||||
"next_chapter": "Nächstes Kapitel",
|
||||
"next_5_chapters": "Nächsten 5 Kapitel",
|
||||
"next_10_chapters": "Nächsten 10 Kapitel",
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@
|
|||
"skip_ending": "Skip ending",
|
||||
"fullscreen": "Fullscreen",
|
||||
"update_library": "Update library",
|
||||
"updating_library": "Updating library",
|
||||
"updating_library": "Updating library ({cur} / {max}) - Failed: {failed}",
|
||||
"next_chapter": "Next chapter",
|
||||
"next_5_chapters": "Next 5 chapters",
|
||||
"next_10_chapters": "Next 10 chapters",
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "Tiempo de espera del botón",
|
||||
"fullscreen": "Pantalla completa",
|
||||
"update_library": "Actualizar biblioteca",
|
||||
"updating_library": "Actualizando biblioteca",
|
||||
"updating_library": "Actualizando biblioteca ({cur} / {max}) - Fallido: {failed}",
|
||||
"next_chapter": "Próximo capítulo",
|
||||
"next_5_chapters": "Próximos 5 capítulos",
|
||||
"next_10_chapters": "Próximos 10 capítulos",
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "Tiempo de espera del botón",
|
||||
"fullscreen": "Pantalla completa",
|
||||
"update_library": "Actualizar biblioteca",
|
||||
"updating_library": "Actualizando biblioteca",
|
||||
"updating_library": "Actualizando biblioteca ({cur} / {max}) - Fallido: {failed}",
|
||||
"next_chapter": "Siguiente capítulo",
|
||||
"next_5_chapters": "Siguientes 5 capítulos",
|
||||
"next_10_chapters": "Siguientes 10 capítulos",
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@
|
|||
"skip_opening": "Passer l'opening",
|
||||
"skip_ending": "Passer l'ending",
|
||||
"update_library": "Mettre à jour la bibliothèque",
|
||||
"updating_library": "Mise à jour de la bibliothèque",
|
||||
"updating_library": "Mise à jour de la bibliothèque ({cur} / {max}) - Échec: {failed}",
|
||||
"next_chapter": "Chapitre suivant",
|
||||
"next_5_chapters": "5 chapitres suivants",
|
||||
"next_10_chapters": "10 chapitres suivants",
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "Timeout tombol",
|
||||
"fullscreen": "Layar Penuh",
|
||||
"update_library": "Perbarui perpustakaan",
|
||||
"updating_library": "Memperbarui perpustakaan",
|
||||
"updating_library": "Memperbarui perpustakaan ({cur} / {max}) - Gagal: {failed}",
|
||||
"next_chapter": "Berikutnya bab",
|
||||
"next_5_chapters": "5 bab berikutnya",
|
||||
"next_10_chapters": "10 bab berikutnya",
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "Timeout del pulsante",
|
||||
"fullscreen": "Schermo intero",
|
||||
"update_library": "Aggiorna libreria",
|
||||
"updating_library": "Aggiornamento della libreria",
|
||||
"updating_library": "Aggiornamento della libreria ({cur} / {max}) - Fallito: {failed}",
|
||||
"next_chapter": "Capitolo successivo",
|
||||
"next_5_chapters": "Prossimi 5 capitoli",
|
||||
"next_10_chapters": "Prossimi 10 capitoli",
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "Tempo limite do botão",
|
||||
"fullscreen": "Tela cheia",
|
||||
"update_library": "Atualizar biblioteca",
|
||||
"updating_library": "Atualizando biblioteca",
|
||||
"updating_library": "Atualizando biblioteca ({cur} / {max}) - Falha: {failed}",
|
||||
"next_chapter": "Próximo capítulo",
|
||||
"next_5_chapters": "Próximos 5 capítulos",
|
||||
"next_10_chapters": "Próximos 10 capítulos",
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "Timeout do botão",
|
||||
"fullscreen": "Tela cheia",
|
||||
"update_library": "Atualizar biblioteca",
|
||||
"updating_library": "Atualizando biblioteca",
|
||||
"updating_library": "Atualizando biblioteca ({cur} / {max}) - Falha: {failed}",
|
||||
"next_chapter": "Próximo capítulo",
|
||||
"next_5_chapters": "Próximos 5 capítulos",
|
||||
"next_10_chapters": "Próximos 10 capítulos",
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "Тайм-аут кнопки",
|
||||
"fullscreen": "Полноэкранный режим",
|
||||
"update_library": "Обновить библиотеку",
|
||||
"updating_library": "Обновление библиотеки",
|
||||
"updating_library": "Обновление библиотеки ({cur} / {max}) - Не удалось: {failed}",
|
||||
"next_chapter": "Следующая глава",
|
||||
"next_5_chapters": "Следующие 5 глав",
|
||||
"next_10_chapters": "Следующие 10 глав",
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@
|
|||
"skip_ending": "ข้ามตอนจบ",
|
||||
"fullscreen": "เต็มจอ",
|
||||
"update_library": "อัพเดทชั้นหนังสือ",
|
||||
"updating_library": "กำลังอัพเดทชั้นหนังสือ",
|
||||
"updating_library": "กำลังอัพเดทชั้นหนังสือ ({cur} / {max}) - ล้มเหลว: {failed}",
|
||||
"next_chapter": "ตอนถัดไป",
|
||||
"next_5_chapters": "5 ตอนถัดไป",
|
||||
"next_10_chapters": "10 ตอนถัดไป",
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
"aniskip_button_timeout": "Düğme Zaman Aşımı",
|
||||
"fullscreen": "Tam ekran",
|
||||
"update_library": "Kütüphaneyi güncelle",
|
||||
"updating_library": "Kütüphaneyi güncelleme",
|
||||
"updating_library": "Kütüphaneyi güncelleme ({cur} / {max}) - Başarısız: {failed}",
|
||||
"next_chapter": "Sonraki bölüm",
|
||||
"next_5_chapters": "Sonraki 5 bölüm",
|
||||
"next_10_chapters": "Sonraki 10 bölüm",
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@
|
|||
"skip_ending": "跳过结尾",
|
||||
"fullscreen": "全屏",
|
||||
"update_library": "更新库",
|
||||
"updating_library": "正在更新库",
|
||||
"updating_library": "正在更新库 ({cur} / {max}) - 失败: {failed}",
|
||||
"next_chapter": "下一章",
|
||||
"next_5_chapters": "下5章",
|
||||
"next_10_chapters": "下10章",
|
||||
|
|
|
|||
|
|
@ -2310,8 +2310,8 @@ abstract class AppLocalizations {
|
|||
/// No description provided for @updating_library.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Updating library'**
|
||||
String get updating_library;
|
||||
/// **'Updating library ({cur} / {max}) - Failed: {failed}'**
|
||||
String updating_library(Object cur, Object failed, Object max);
|
||||
|
||||
/// No description provided for @next_chapter.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsAr extends AppLocalizations {
|
|||
String get update_library => 'تحديث المكتبة';
|
||||
|
||||
@override
|
||||
String get updating_library => 'جاري تحديث المكتبة';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'جاري تحديث المكتبة ($max / $cur) - فشل: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'الفصل التالي';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||
String get update_library => 'Bibliothek aktualisieren';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Bibliothek wird aktualisiert';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Bibliothek wird aktualisiert ($cur / $max) - Fehlgeschlagen: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Nächstes Kapitel';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
String get update_library => 'Update library';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Updating library';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Updating library ($cur / $max) - Failed: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Next chapter';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsEs extends AppLocalizations {
|
|||
String get update_library => 'Actualizar biblioteca';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Actualizando biblioteca';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Actualizando biblioteca ($cur / $max) - Fallido: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Próximo capítulo';
|
||||
|
|
@ -2570,7 +2572,9 @@ class AppLocalizationsEs419 extends AppLocalizationsEs {
|
|||
String get update_library => 'Actualizar biblioteca';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Actualizando biblioteca';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Actualizando biblioteca ($cur / $max) - Fallido: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Siguiente capítulo';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsFr extends AppLocalizations {
|
|||
String get update_library => 'Mettre à jour la bibliothèque';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Mise à jour de la bibliothèque';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Mise à jour de la bibliothèque ($cur / $max) - Échec: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Chapitre suivant';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsId extends AppLocalizations {
|
|||
String get update_library => 'Perbarui perpustakaan';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Memperbarui perpustakaan';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Memperbarui perpustakaan ($cur / $max) - Gagal: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Berikutnya bab';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsIt extends AppLocalizations {
|
|||
String get update_library => 'Aggiorna libreria';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Aggiornamento della libreria';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Aggiornamento della libreria ($cur / $max) - Fallito: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Capitolo successivo';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsPt extends AppLocalizations {
|
|||
String get update_library => 'Atualizar biblioteca';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Atualizando biblioteca';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Atualizando biblioteca ($cur / $max) - Falha: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Próximo capítulo';
|
||||
|
|
@ -2570,7 +2572,9 @@ class AppLocalizationsPtBr extends AppLocalizationsPt {
|
|||
String get update_library => 'Atualizar biblioteca';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Atualizando biblioteca';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Atualizando biblioteca ($cur / $max) - Falha: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Próximo capítulo';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsRu extends AppLocalizations {
|
|||
String get update_library => 'Обновить библиотеку';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Обновление библиотеки';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Обновление библиотеки ($cur / $max) - Не удалось: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Следующая глава';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsTh extends AppLocalizations {
|
|||
String get update_library => 'อัพเดทชั้นหนังสือ';
|
||||
|
||||
@override
|
||||
String get updating_library => 'กำลังอัพเดทชั้นหนังสือ';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'กำลังอัพเดทชั้นหนังสือ ($cur / $max) - ล้มเหลว: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'ตอนถัดไป';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsTr extends AppLocalizations {
|
|||
String get update_library => 'Kütüphaneyi güncelle';
|
||||
|
||||
@override
|
||||
String get updating_library => 'Kütüphaneyi güncelleme';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return 'Kütüphaneyi güncelleme ($cur / $max) - Başarısız: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => 'Sonraki bölüm';
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,9 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||
String get update_library => '更新库';
|
||||
|
||||
@override
|
||||
String get updating_library => '正在更新库';
|
||||
String updating_library(Object cur, Object failed, Object max) {
|
||||
return '正在更新库 ($cur / $max) - 失败: $failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get next_chapter => '下一章';
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import 'package:bot_toast/bot_toast.dart';
|
|||
import 'package:desktop_webview_window/desktop_webview_window.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:intl/date_symbol_data_local.dart';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'dart:typed_data';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:mangayomi/l10n/generated/app_localizations.dart';
|
||||
import 'package:mangayomi/modules/widgets/custom_sliver_grouped_list_view.dart';
|
||||
|
||||
import 'package:isar/isar.dart';
|
||||
|
|
@ -137,45 +138,7 @@ class _HistoryScreenState extends ConsumerState<HistoryScreen>
|
|||
),
|
||||
const SizedBox(width: 15),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
List<History> histories =
|
||||
isar.historys
|
||||
.filter()
|
||||
.idIsNotNull()
|
||||
.chapter(
|
||||
(q) => q.manga(
|
||||
(q) => q.itemTypeEqualTo(
|
||||
_tabBarController.index == 0 &&
|
||||
!hideItems.contains(
|
||||
"/MangaLibrary",
|
||||
)
|
||||
? ItemType.manga
|
||||
: _tabBarController.index ==
|
||||
1 -
|
||||
(hideItems.contains(
|
||||
"/MangaLibrary",
|
||||
)
|
||||
? 1
|
||||
: 0) &&
|
||||
!hideItems.contains(
|
||||
"/AnimeLibrary",
|
||||
)
|
||||
? ItemType.anime
|
||||
: ItemType.novel,
|
||||
),
|
||||
),
|
||||
)
|
||||
.findAllSync()
|
||||
.toList();
|
||||
isar.writeTxnSync(() {
|
||||
for (var history in histories) {
|
||||
isar.historys.deleteSync(history.id!);
|
||||
}
|
||||
});
|
||||
if (mounted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
onPressed: () => clearHistory(hideItems),
|
||||
child: Text(l10n.ok),
|
||||
),
|
||||
],
|
||||
|
|
@ -227,6 +190,38 @@ class _HistoryScreenState extends ConsumerState<HistoryScreen>
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
void clearHistory(List<String> hideItems) {
|
||||
List<History> histories =
|
||||
isar.historys
|
||||
.filter()
|
||||
.idIsNotNull()
|
||||
.chapter(
|
||||
(q) => q.manga(
|
||||
(q) => q.itemTypeEqualTo(getCurrentItemType(hideItems)),
|
||||
),
|
||||
)
|
||||
.findAllSync()
|
||||
.toList();
|
||||
isar.writeTxnSync(() {
|
||||
for (var history in histories) {
|
||||
isar.historys.deleteSync(history.id!);
|
||||
}
|
||||
});
|
||||
if (mounted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
}
|
||||
|
||||
ItemType getCurrentItemType(List<String> hideItems) {
|
||||
return _tabBarController.index == 0 && !hideItems.contains("/MangaLibrary")
|
||||
? ItemType.manga
|
||||
: _tabBarController.index ==
|
||||
1 - (hideItems.contains("/MangaLibrary") ? 1 : 0) &&
|
||||
!hideItems.contains("/AnimeLibrary")
|
||||
? ItemType.anime
|
||||
: ItemType.novel;
|
||||
}
|
||||
}
|
||||
|
||||
class HistoryTab extends ConsumerStatefulWidget {
|
||||
|
|
@ -243,23 +238,14 @@ class _HistoryTabState extends ConsumerState<HistoryTab> {
|
|||
Widget build(BuildContext context) {
|
||||
final l10n = l10nLocalizations(context)!;
|
||||
final history = ref.watch(
|
||||
getAllHistoryStreamProvider(itemType: widget.itemType),
|
||||
getAllHistoryStreamProvider(
|
||||
itemType: widget.itemType,
|
||||
search: widget.query,
|
||||
),
|
||||
);
|
||||
return Scaffold(
|
||||
body: history.when(
|
||||
data: (data) {
|
||||
final entries =
|
||||
data
|
||||
.where(
|
||||
(element) =>
|
||||
widget.query.isNotEmpty
|
||||
? element.chapter.value!.manga.value!.name!
|
||||
.toLowerCase()
|
||||
.contains(widget.query.toLowerCase())
|
||||
: true,
|
||||
)
|
||||
.toList();
|
||||
|
||||
data: (entries) {
|
||||
if (entries.isNotEmpty) {
|
||||
return CustomScrollView(
|
||||
slivers: [
|
||||
|
|
@ -302,8 +288,8 @@ class _HistoryTabState extends ConsumerState<HistoryTab> {
|
|||
elevation: 0,
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
onPressed: () {
|
||||
chapter.pushToReaderView(context);
|
||||
onPressed: () async {
|
||||
await chapter.pushToReaderView(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
|
|
@ -330,28 +316,7 @@ class _HistoryTabState extends ConsumerState<HistoryTab> {
|
|||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
child:
|
||||
manga.customCoverImage != null
|
||||
? Image.memory(
|
||||
manga.customCoverImage
|
||||
as Uint8List,
|
||||
)
|
||||
: cachedNetworkImage(
|
||||
headers: ref.watch(
|
||||
headersProvider(
|
||||
source: manga.source!,
|
||||
lang: manga.lang!,
|
||||
),
|
||||
),
|
||||
imageUrl: toImgUrl(
|
||||
manga.customCoverFromTracker ??
|
||||
manga.imageUrl ??
|
||||
"",
|
||||
),
|
||||
width: 60,
|
||||
height: 90,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
child: getCoverImage(manga),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -418,81 +383,12 @@ class _HistoryTabState extends ConsumerState<HistoryTab> {
|
|||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(l10n.remove),
|
||||
content: Text(
|
||||
l10n.remove_history_msg,
|
||||
),
|
||||
actions: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(l10n.cancel),
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await manga.chapters
|
||||
.load();
|
||||
final chapters =
|
||||
manga.chapters;
|
||||
await isar.writeTxn(
|
||||
() async {
|
||||
await isar.historys
|
||||
.delete(
|
||||
element.id!,
|
||||
);
|
||||
for (var chapter
|
||||
in chapters) {
|
||||
await isar
|
||||
.chapters
|
||||
.delete(
|
||||
chapter.id!,
|
||||
);
|
||||
}
|
||||
await isar.mangas
|
||||
.delete(
|
||||
manga.id!,
|
||||
);
|
||||
},
|
||||
);
|
||||
await ref
|
||||
.read(
|
||||
synchingProvider(
|
||||
syncId: 1,
|
||||
).notifier,
|
||||
)
|
||||
.addChangedPartAsync(
|
||||
ActionType
|
||||
.removeItem,
|
||||
manga.id,
|
||||
"{}",
|
||||
true,
|
||||
);
|
||||
if (context.mounted) {
|
||||
Navigator.pop(
|
||||
context,
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Text(l10n.remove),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
onPressed:
|
||||
() => openDeleteDialog(
|
||||
l10n,
|
||||
manga,
|
||||
element.id,
|
||||
),
|
||||
icon: Icon(
|
||||
Icons.delete_outline,
|
||||
size: 25,
|
||||
|
|
@ -529,4 +425,72 @@ class _HistoryTabState extends ConsumerState<HistoryTab> {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getCoverImage(Manga manga) {
|
||||
return manga.customCoverImage != null
|
||||
? Image.memory(manga.customCoverImage as Uint8List)
|
||||
: cachedCompressedNetworkImage(
|
||||
headers: ref.watch(
|
||||
headersProvider(source: manga.source!, lang: manga.lang!),
|
||||
),
|
||||
imageUrl: toImgUrl(
|
||||
manga.customCoverFromTracker ?? manga.imageUrl ?? "",
|
||||
),
|
||||
width: 60,
|
||||
height: 90,
|
||||
fit: BoxFit.cover,
|
||||
);
|
||||
}
|
||||
|
||||
void openDeleteDialog(AppLocalizations l10n, Manga manga, int? deleteId) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(l10n.remove),
|
||||
content: Text(l10n.remove_history_msg),
|
||||
actions: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(l10n.cancel),
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
TextButton(
|
||||
onPressed: () async => deleteManga(context, manga, deleteId),
|
||||
child: Text(l10n.remove),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> deleteManga(
|
||||
BuildContext context,
|
||||
Manga manga,
|
||||
int? deleteId,
|
||||
) async {
|
||||
await manga.chapters.load();
|
||||
final chapters = manga.chapters;
|
||||
await isar.writeTxn(() async {
|
||||
await isar.historys.delete(deleteId!);
|
||||
for (var chapter in chapters) {
|
||||
await isar.chapters.delete(chapter.id!);
|
||||
}
|
||||
await isar.mangas.delete(manga.id!);
|
||||
});
|
||||
await ref
|
||||
.read(synchingProvider(syncId: 1).notifier)
|
||||
.addChangedPartAsync(ActionType.removeItem, manga.id, "{}", true);
|
||||
if (context.mounted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,17 @@ part 'isar_providers.g.dart';
|
|||
Stream<List<History>> getAllHistoryStream(
|
||||
Ref ref, {
|
||||
required ItemType itemType,
|
||||
String search = "",
|
||||
}) async* {
|
||||
yield* isar.historys
|
||||
.filter()
|
||||
.idIsNotNull()
|
||||
.and()
|
||||
.chapter((q) => q.manga((q) => q.itemTypeEqualTo(itemType)))
|
||||
.and()
|
||||
.chapter(
|
||||
(q) => q.manga((q) => q.nameContains(search, caseSensitive: false)),
|
||||
)
|
||||
.watch(fireImmediately: true);
|
||||
}
|
||||
|
||||
|
|
@ -25,11 +30,16 @@ Stream<List<History>> getAllHistoryStream(
|
|||
Stream<List<Update>> getAllUpdateStream(
|
||||
Ref ref, {
|
||||
required ItemType itemType,
|
||||
String search = "",
|
||||
}) async* {
|
||||
yield* isar.updates
|
||||
.filter()
|
||||
.idIsNotNull()
|
||||
.and()
|
||||
.chapter((q) => q.manga((q) => q.itemTypeEqualTo(itemType)))
|
||||
.and()
|
||||
.chapter(
|
||||
(q) => q.manga((q) => q.nameContains(search, caseSensitive: false)),
|
||||
)
|
||||
.watch(fireImmediately: true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ part of 'isar_providers.dart';
|
|||
// **************************************************************************
|
||||
|
||||
String _$getAllHistoryStreamHash() =>
|
||||
r'42048cb03035be55b52fc501fb2309cdb2acfcb8';
|
||||
r'1ce5bd0046fbbec46e91b7a486523945699d95f3';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -42,9 +42,11 @@ class GetAllHistoryStreamFamily extends Family<AsyncValue<List<History>>> {
|
|||
/// See also [getAllHistoryStream].
|
||||
GetAllHistoryStreamProvider call({
|
||||
required ItemType itemType,
|
||||
String search = "",
|
||||
}) {
|
||||
return GetAllHistoryStreamProvider(
|
||||
itemType: itemType,
|
||||
search: search,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -54,6 +56,7 @@ class GetAllHistoryStreamFamily extends Family<AsyncValue<List<History>>> {
|
|||
) {
|
||||
return call(
|
||||
itemType: provider.itemType,
|
||||
search: provider.search,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -78,10 +81,12 @@ class GetAllHistoryStreamProvider
|
|||
/// See also [getAllHistoryStream].
|
||||
GetAllHistoryStreamProvider({
|
||||
required ItemType itemType,
|
||||
String search = "",
|
||||
}) : this._internal(
|
||||
(ref) => getAllHistoryStream(
|
||||
ref as GetAllHistoryStreamRef,
|
||||
itemType: itemType,
|
||||
search: search,
|
||||
),
|
||||
from: getAllHistoryStreamProvider,
|
||||
name: r'getAllHistoryStreamProvider',
|
||||
|
|
@ -93,6 +98,7 @@ class GetAllHistoryStreamProvider
|
|||
allTransitiveDependencies:
|
||||
GetAllHistoryStreamFamily._allTransitiveDependencies,
|
||||
itemType: itemType,
|
||||
search: search,
|
||||
);
|
||||
|
||||
GetAllHistoryStreamProvider._internal(
|
||||
|
|
@ -103,9 +109,11 @@ class GetAllHistoryStreamProvider
|
|||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.itemType,
|
||||
required this.search,
|
||||
}) : super.internal();
|
||||
|
||||
final ItemType itemType;
|
||||
final String search;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
|
|
@ -121,6 +129,7 @@ class GetAllHistoryStreamProvider
|
|||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
itemType: itemType,
|
||||
search: search,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -132,13 +141,16 @@ class GetAllHistoryStreamProvider
|
|||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is GetAllHistoryStreamProvider && other.itemType == itemType;
|
||||
return other is GetAllHistoryStreamProvider &&
|
||||
other.itemType == itemType &&
|
||||
other.search == search;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, itemType.hashCode);
|
||||
hash = _SystemHash.combine(hash, search.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
|
|
@ -149,6 +161,9 @@ class GetAllHistoryStreamProvider
|
|||
mixin GetAllHistoryStreamRef on AutoDisposeStreamProviderRef<List<History>> {
|
||||
/// The parameter `itemType` of this provider.
|
||||
ItemType get itemType;
|
||||
|
||||
/// The parameter `search` of this provider.
|
||||
String get search;
|
||||
}
|
||||
|
||||
class _GetAllHistoryStreamProviderElement
|
||||
|
|
@ -158,10 +173,12 @@ class _GetAllHistoryStreamProviderElement
|
|||
|
||||
@override
|
||||
ItemType get itemType => (origin as GetAllHistoryStreamProvider).itemType;
|
||||
@override
|
||||
String get search => (origin as GetAllHistoryStreamProvider).search;
|
||||
}
|
||||
|
||||
String _$getAllUpdateStreamHash() =>
|
||||
r'6a20f8feba3010c2ab7a80560f7a7f6cf10c7366';
|
||||
r'43369b20d702d12aeae627fcd04ceb61caf0dc74';
|
||||
|
||||
/// See also [getAllUpdateStream].
|
||||
@ProviderFor(getAllUpdateStream)
|
||||
|
|
@ -175,9 +192,11 @@ class GetAllUpdateStreamFamily extends Family<AsyncValue<List<Update>>> {
|
|||
/// See also [getAllUpdateStream].
|
||||
GetAllUpdateStreamProvider call({
|
||||
required ItemType itemType,
|
||||
String search = "",
|
||||
}) {
|
||||
return GetAllUpdateStreamProvider(
|
||||
itemType: itemType,
|
||||
search: search,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -187,6 +206,7 @@ class GetAllUpdateStreamFamily extends Family<AsyncValue<List<Update>>> {
|
|||
) {
|
||||
return call(
|
||||
itemType: provider.itemType,
|
||||
search: provider.search,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -211,10 +231,12 @@ class GetAllUpdateStreamProvider
|
|||
/// See also [getAllUpdateStream].
|
||||
GetAllUpdateStreamProvider({
|
||||
required ItemType itemType,
|
||||
String search = "",
|
||||
}) : this._internal(
|
||||
(ref) => getAllUpdateStream(
|
||||
ref as GetAllUpdateStreamRef,
|
||||
itemType: itemType,
|
||||
search: search,
|
||||
),
|
||||
from: getAllUpdateStreamProvider,
|
||||
name: r'getAllUpdateStreamProvider',
|
||||
|
|
@ -226,6 +248,7 @@ class GetAllUpdateStreamProvider
|
|||
allTransitiveDependencies:
|
||||
GetAllUpdateStreamFamily._allTransitiveDependencies,
|
||||
itemType: itemType,
|
||||
search: search,
|
||||
);
|
||||
|
||||
GetAllUpdateStreamProvider._internal(
|
||||
|
|
@ -236,9 +259,11 @@ class GetAllUpdateStreamProvider
|
|||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.itemType,
|
||||
required this.search,
|
||||
}) : super.internal();
|
||||
|
||||
final ItemType itemType;
|
||||
final String search;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
|
|
@ -254,6 +279,7 @@ class GetAllUpdateStreamProvider
|
|||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
itemType: itemType,
|
||||
search: search,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -265,13 +291,16 @@ class GetAllUpdateStreamProvider
|
|||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is GetAllUpdateStreamProvider && other.itemType == itemType;
|
||||
return other is GetAllUpdateStreamProvider &&
|
||||
other.itemType == itemType &&
|
||||
other.search == search;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, itemType.hashCode);
|
||||
hash = _SystemHash.combine(hash, search.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
|
|
@ -282,6 +311,9 @@ class GetAllUpdateStreamProvider
|
|||
mixin GetAllUpdateStreamRef on AutoDisposeStreamProviderRef<List<Update>> {
|
||||
/// The parameter `itemType` of this provider.
|
||||
ItemType get itemType;
|
||||
|
||||
/// The parameter `search` of this provider.
|
||||
String get search;
|
||||
}
|
||||
|
||||
class _GetAllUpdateStreamProviderElement
|
||||
|
|
@ -291,6 +323,8 @@ class _GetAllUpdateStreamProviderElement
|
|||
|
||||
@override
|
||||
ItemType get itemType => (origin as GetAllUpdateStreamProvider).itemType;
|
||||
@override
|
||||
String get search => (origin as GetAllUpdateStreamProvider).search;
|
||||
}
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import 'package:mangayomi/modules/library/providers/add_torrent.dart';
|
|||
import 'package:mangayomi/modules/library/providers/local_archive.dart';
|
||||
import 'package:mangayomi/modules/manga/detail/providers/update_manga_detail_providers.dart';
|
||||
import 'package:mangayomi/modules/more/categories/providers/isar_providers.dart';
|
||||
import 'package:mangayomi/modules/more/settings/appearance/providers/theme_mode_state_provider.dart';
|
||||
import 'package:mangayomi/modules/more/settings/sync/providers/sync_providers.dart';
|
||||
import 'package:mangayomi/modules/widgets/custom_draggable_tabbar.dart';
|
||||
import 'package:mangayomi/modules/widgets/manga_image_card_widget.dart';
|
||||
|
|
@ -72,20 +73,37 @@ class _LibraryScreenState extends ConsumerState<LibraryScreen>
|
|||
}
|
||||
|
||||
Future<void> _updateLibrary(List<Manga> mangaList) async {
|
||||
bool isDark = ref.read(themeModeStateProvider);
|
||||
botToast(
|
||||
context.l10n.updating_library,
|
||||
context.l10n.updating_library("0", "0", "0"),
|
||||
fontSize: 13,
|
||||
second: 1600,
|
||||
second: 30,
|
||||
alignY: !context.isTablet ? 0.85 : 1,
|
||||
themeDark: isDark,
|
||||
);
|
||||
int numbers = 0;
|
||||
int failed = 0;
|
||||
for (var manga in mangaList) {
|
||||
try {
|
||||
await ref.read(
|
||||
updateMangaDetailProvider(mangaId: manga.id, isInit: false).future,
|
||||
);
|
||||
} catch (_) {}
|
||||
} catch (_) {
|
||||
failed++;
|
||||
}
|
||||
numbers++;
|
||||
if (context.mounted) {
|
||||
botToast(
|
||||
context.l10n.updating_library(numbers, failed, mangaList.length),
|
||||
fontSize: 13,
|
||||
second: 10,
|
||||
alignY: !context.isTablet ? 0.85 : 1,
|
||||
animationDuration: 0,
|
||||
dismissDirections: [DismissDirection.none],
|
||||
onlyOne: false,
|
||||
themeDark: isDark,
|
||||
);
|
||||
}
|
||||
}
|
||||
await Future.doWhile(() async {
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Future<dynamic> updateMangaDetail(
|
|||
Ref ref, {
|
||||
required int? mangaId,
|
||||
required bool isInit,
|
||||
bool showToast = true,
|
||||
}) async {
|
||||
final manga = isar.mangas.getSync(mangaId!);
|
||||
if (manga!.chapters.isNotEmpty && isInit) {
|
||||
|
|
@ -29,7 +30,7 @@ Future<dynamic> updateMangaDetail(
|
|||
getDetailProvider(url: manga.link!, source: source!).future,
|
||||
);
|
||||
} catch (e) {
|
||||
botToast(e.toString());
|
||||
if (showToast) botToast(e.toString());
|
||||
return;
|
||||
}
|
||||
final genre =
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'update_manga_detail_providers.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$updateMangaDetailHash() => r'cfeaefe8375a38abbf07a774830d97ca57c6f2c9';
|
||||
String _$updateMangaDetailHash() => r'47fb1d79d48c4832fa7027ea76020044eb1fa2b4';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -42,10 +42,12 @@ class UpdateMangaDetailFamily extends Family<AsyncValue<dynamic>> {
|
|||
UpdateMangaDetailProvider call({
|
||||
required int? mangaId,
|
||||
required bool isInit,
|
||||
bool showToast = true,
|
||||
}) {
|
||||
return UpdateMangaDetailProvider(
|
||||
mangaId: mangaId,
|
||||
isInit: isInit,
|
||||
showToast: showToast,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -56,6 +58,7 @@ class UpdateMangaDetailFamily extends Family<AsyncValue<dynamic>> {
|
|||
return call(
|
||||
mangaId: provider.mangaId,
|
||||
isInit: provider.isInit,
|
||||
showToast: provider.showToast,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -80,11 +83,13 @@ class UpdateMangaDetailProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
UpdateMangaDetailProvider({
|
||||
required int? mangaId,
|
||||
required bool isInit,
|
||||
bool showToast = true,
|
||||
}) : this._internal(
|
||||
(ref) => updateMangaDetail(
|
||||
ref as UpdateMangaDetailRef,
|
||||
mangaId: mangaId,
|
||||
isInit: isInit,
|
||||
showToast: showToast,
|
||||
),
|
||||
from: updateMangaDetailProvider,
|
||||
name: r'updateMangaDetailProvider',
|
||||
|
|
@ -97,6 +102,7 @@ class UpdateMangaDetailProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
UpdateMangaDetailFamily._allTransitiveDependencies,
|
||||
mangaId: mangaId,
|
||||
isInit: isInit,
|
||||
showToast: showToast,
|
||||
);
|
||||
|
||||
UpdateMangaDetailProvider._internal(
|
||||
|
|
@ -108,10 +114,12 @@ class UpdateMangaDetailProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
required super.from,
|
||||
required this.mangaId,
|
||||
required this.isInit,
|
||||
required this.showToast,
|
||||
}) : super.internal();
|
||||
|
||||
final int? mangaId;
|
||||
final bool isInit;
|
||||
final bool showToast;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
|
|
@ -128,6 +136,7 @@ class UpdateMangaDetailProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
debugGetCreateSourceHash: null,
|
||||
mangaId: mangaId,
|
||||
isInit: isInit,
|
||||
showToast: showToast,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -141,7 +150,8 @@ class UpdateMangaDetailProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
bool operator ==(Object other) {
|
||||
return other is UpdateMangaDetailProvider &&
|
||||
other.mangaId == mangaId &&
|
||||
other.isInit == isInit;
|
||||
other.isInit == isInit &&
|
||||
other.showToast == showToast;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -149,6 +159,7 @@ class UpdateMangaDetailProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, mangaId.hashCode);
|
||||
hash = _SystemHash.combine(hash, isInit.hashCode);
|
||||
hash = _SystemHash.combine(hash, showToast.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
|
|
@ -162,6 +173,9 @@ mixin UpdateMangaDetailRef on AutoDisposeFutureProviderRef<dynamic> {
|
|||
|
||||
/// The parameter `isInit` of this provider.
|
||||
bool get isInit;
|
||||
|
||||
/// The parameter `showToast` of this provider.
|
||||
bool get showToast;
|
||||
}
|
||||
|
||||
class _UpdateMangaDetailProviderElement
|
||||
|
|
@ -173,6 +187,8 @@ class _UpdateMangaDetailProviderElement
|
|||
int? get mangaId => (origin as UpdateMangaDetailProvider).mangaId;
|
||||
@override
|
||||
bool get isInit => (origin as UpdateMangaDetailProvider).isInit;
|
||||
@override
|
||||
bool get showToast => (origin as UpdateMangaDetailProvider).showToast;
|
||||
}
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
|
|
@ -14,6 +14,14 @@ class ThemeModeState extends _$ThemeModeState {
|
|||
return isar.settings.getSync(227)!.themeIsDark!;
|
||||
}
|
||||
|
||||
void setTheme(Brightness brightness) {
|
||||
if (brightness == Brightness.light) {
|
||||
ref.read(themeModeStateProvider.notifier).setLightTheme();
|
||||
} else {
|
||||
ref.read(themeModeStateProvider.notifier).setDarkTheme();
|
||||
}
|
||||
}
|
||||
|
||||
void setLightTheme() {
|
||||
final settings = isar.settings.getSync(227);
|
||||
state = false;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'theme_mode_state_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$themeModeStateHash() => r'49a0f05f3d5eb1fcd49ec3c8c0d0b57a732b54fc';
|
||||
String _$themeModeStateHash() => r'264bf4a814cec831e34d916f273b4db6513e583c';
|
||||
|
||||
/// See also [ThemeModeState].
|
||||
@ProviderFor(ThemeModeState)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:mangayomi/modules/more/settings/appearance/providers/theme_mode_state_provider.dart';
|
||||
import 'package:mangayomi/modules/widgets/custom_sliver_grouped_list_view.dart';
|
||||
|
||||
import 'package:isar/isar.dart';
|
||||
|
|
@ -37,11 +38,13 @@ class _UpdatesScreenState extends ConsumerState<UpdatesScreen>
|
|||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
bool isDark = ref.read(themeModeStateProvider);
|
||||
botToast(
|
||||
context.l10n.updating_library,
|
||||
context.l10n.updating_library("0", "0", "0"),
|
||||
fontSize: 13,
|
||||
second: 1600,
|
||||
second: 30,
|
||||
alignY: !context.isTablet ? 0.85 : 1,
|
||||
themeDark: isDark,
|
||||
);
|
||||
final mangaList =
|
||||
isar.mangas
|
||||
|
|
@ -60,14 +63,33 @@ class _UpdatesScreenState extends ConsumerState<UpdatesScreen>
|
|||
.isLocalArchiveEqualTo(false)
|
||||
.findAllSync();
|
||||
int numbers = 0;
|
||||
int failed = 0;
|
||||
|
||||
for (var manga in mangaList) {
|
||||
try {
|
||||
await ref.read(
|
||||
updateMangaDetailProvider(mangaId: manga.id, isInit: false).future,
|
||||
updateMangaDetailProvider(
|
||||
mangaId: manga.id,
|
||||
isInit: false,
|
||||
showToast: false,
|
||||
).future,
|
||||
);
|
||||
} catch (_) {}
|
||||
} catch (_) {
|
||||
failed++;
|
||||
}
|
||||
numbers++;
|
||||
if (context.mounted) {
|
||||
botToast(
|
||||
context.l10n.updating_library(numbers, failed, mangaList.length),
|
||||
fontSize: 13,
|
||||
second: 10,
|
||||
alignY: !context.isTablet ? 0.85 : 1,
|
||||
animationDuration: 0,
|
||||
dismissDirections: [DismissDirection.none],
|
||||
onlyOne: false,
|
||||
themeDark: isDark,
|
||||
);
|
||||
}
|
||||
}
|
||||
await Future.doWhile(() async {
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
|
|
@ -196,45 +218,7 @@ class _UpdatesScreenState extends ConsumerState<UpdatesScreen>
|
|||
),
|
||||
const SizedBox(width: 15),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
List<Update> updates =
|
||||
isar.updates
|
||||
.filter()
|
||||
.idIsNotNull()
|
||||
.chapter(
|
||||
(q) => q.manga(
|
||||
(q) => q.itemTypeEqualTo(
|
||||
_tabBarController.index == 0 &&
|
||||
!hideItems.contains(
|
||||
"/MangaLibrary",
|
||||
)
|
||||
? ItemType.manga
|
||||
: _tabBarController.index ==
|
||||
1 -
|
||||
(hideItems.contains(
|
||||
"/MangaLibrary",
|
||||
)
|
||||
? 1
|
||||
: 0) &&
|
||||
!hideItems.contains(
|
||||
"/AnimeLibrary",
|
||||
)
|
||||
? ItemType.anime
|
||||
: ItemType.novel,
|
||||
),
|
||||
),
|
||||
)
|
||||
.findAllSync()
|
||||
.toList();
|
||||
isar.writeTxnSync(() {
|
||||
for (var update in updates) {
|
||||
isar.updates.deleteSync(update.id!);
|
||||
}
|
||||
});
|
||||
if (mounted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
onPressed: () => clearUpdates(hideItems),
|
||||
child: Text(l10n.ok),
|
||||
),
|
||||
],
|
||||
|
|
@ -313,6 +297,38 @@ class _UpdatesScreenState extends ConsumerState<UpdatesScreen>
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
void clearUpdates(List<String> hideItems) {
|
||||
List<Update> updates =
|
||||
isar.updates
|
||||
.filter()
|
||||
.idIsNotNull()
|
||||
.chapter(
|
||||
(q) => q.manga(
|
||||
(q) => q.itemTypeEqualTo(getCurrentItemType(hideItems)),
|
||||
),
|
||||
)
|
||||
.findAllSync()
|
||||
.toList();
|
||||
isar.writeTxnSync(() {
|
||||
for (var update in updates) {
|
||||
isar.updates.deleteSync(update.id!);
|
||||
}
|
||||
});
|
||||
if (mounted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
}
|
||||
|
||||
ItemType getCurrentItemType(List<String> hideItems) {
|
||||
return _tabBarController.index == 0 && !hideItems.contains("/MangaLibrary")
|
||||
? ItemType.manga
|
||||
: _tabBarController.index ==
|
||||
1 - (hideItems.contains("/MangaLibrary") ? 1 : 0) &&
|
||||
!hideItems.contains("/AnimeLibrary")
|
||||
? ItemType.anime
|
||||
: ItemType.novel;
|
||||
}
|
||||
}
|
||||
|
||||
class UpdateTab extends ConsumerStatefulWidget {
|
||||
|
|
@ -335,29 +351,21 @@ class _UpdateTabState extends ConsumerState<UpdateTab> {
|
|||
Widget build(BuildContext context) {
|
||||
final l10n = l10nLocalizations(context)!;
|
||||
final update = ref.watch(
|
||||
getAllUpdateStreamProvider(itemType: widget.itemType),
|
||||
getAllUpdateStreamProvider(
|
||||
itemType: widget.itemType,
|
||||
search: widget.query,
|
||||
),
|
||||
);
|
||||
return Scaffold(
|
||||
body: Stack(
|
||||
children: [
|
||||
update.when(
|
||||
data: (data) {
|
||||
final entries =
|
||||
data
|
||||
.where(
|
||||
(element) =>
|
||||
widget.query.isNotEmpty
|
||||
? element.chapter.value!.manga.value!.name!
|
||||
.toLowerCase()
|
||||
.contains(widget.query.toLowerCase())
|
||||
: true,
|
||||
)
|
||||
.toList();
|
||||
data: (entries) {
|
||||
final lastUpdatedList =
|
||||
data
|
||||
entries
|
||||
.map((e) => e.chapter.value!.manga.value!.lastUpdate!)
|
||||
.toList();
|
||||
lastUpdatedList.sort((a, b) => a.compareTo(b));
|
||||
lastUpdatedList.sort((a, b) => b.compareTo(a));
|
||||
final lastUpdated = lastUpdatedList.firstOrNull;
|
||||
if (entries.isNotEmpty) {
|
||||
return CustomScrollView(
|
||||
|
|
|
|||
|
|
@ -365,4 +365,7 @@ class CustomExtendedNetworkImageProvider
|
|||
|
||||
return await _loadNetwork(this, chunkEvents);
|
||||
}
|
||||
|
||||
@override
|
||||
WebHtmlElementStrategy get webHtmlElementStrategy => WebHtmlElementStrategy.fallback;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'aniskip.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$aniSkipHash() => r'887869b54e2e151633efd46da83bde845e14f421';
|
||||
String _$aniSkipHash() => r'2e5d19b025a2207ff64da7bf7908450ea9e5ff8c';
|
||||
|
||||
/// See also [AniSkip].
|
||||
@ProviderFor(AniSkip)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'anilist.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$anilistHash() => r'70e8cd537270a9054a1ef72de117fc7ad5545218';
|
||||
String _$anilistHash() => r'ddd07acc8d28d2aa95c942566109e9393ca9e5ed';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@ part of 'client.dart';
|
|||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ProxySettings {
|
||||
|
|
@ -21,43 +20,48 @@ mixin _$ProxySettings {
|
|||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() noProxy,
|
||||
required TResult Function(List<CustomProxy> field0) customProxyList,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? noProxy,
|
||||
TResult? Function(List<CustomProxy> field0)? customProxyList,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? noProxy,
|
||||
TResult Function(List<CustomProxy> field0)? customProxyList,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(ProxySettings_NoProxy value) noProxy,
|
||||
required TResult Function(ProxySettings_CustomProxyList value)
|
||||
customProxyList,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
customProxyList,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(ProxySettings_NoProxy value)? noProxy,
|
||||
TResult? Function(ProxySettings_CustomProxyList value)? customProxyList,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(ProxySettings_NoProxy value)? noProxy,
|
||||
TResult Function(ProxySettings_CustomProxyList value)? customProxyList,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProxySettingsCopyWith<$Res> {
|
||||
factory $ProxySettingsCopyWith(
|
||||
ProxySettings value,
|
||||
$Res Function(ProxySettings) then,
|
||||
) = _$ProxySettingsCopyWithImpl<$Res, ProxySettings>;
|
||||
ProxySettings value, $Res Function(ProxySettings) then) =
|
||||
_$ProxySettingsCopyWithImpl<$Res, ProxySettings>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
|
@ -77,19 +81,18 @@ class _$ProxySettingsCopyWithImpl<$Res, $Val extends ProxySettings>
|
|||
/// @nodoc
|
||||
abstract class _$$ProxySettings_NoProxyImplCopyWith<$Res> {
|
||||
factory _$$ProxySettings_NoProxyImplCopyWith(
|
||||
_$ProxySettings_NoProxyImpl value,
|
||||
$Res Function(_$ProxySettings_NoProxyImpl) then,
|
||||
) = __$$ProxySettings_NoProxyImplCopyWithImpl<$Res>;
|
||||
_$ProxySettings_NoProxyImpl value,
|
||||
$Res Function(_$ProxySettings_NoProxyImpl) then) =
|
||||
__$$ProxySettings_NoProxyImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProxySettings_NoProxyImplCopyWithImpl<$Res>
|
||||
extends _$ProxySettingsCopyWithImpl<$Res, _$ProxySettings_NoProxyImpl>
|
||||
implements _$$ProxySettings_NoProxyImplCopyWith<$Res> {
|
||||
__$$ProxySettings_NoProxyImplCopyWithImpl(
|
||||
_$ProxySettings_NoProxyImpl _value,
|
||||
$Res Function(_$ProxySettings_NoProxyImpl) _then,
|
||||
) : super(_value, _then);
|
||||
__$$ProxySettings_NoProxyImplCopyWithImpl(_$ProxySettings_NoProxyImpl _value,
|
||||
$Res Function(_$ProxySettings_NoProxyImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProxySettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -151,7 +154,7 @@ class _$ProxySettings_NoProxyImpl extends ProxySettings_NoProxy {
|
|||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(ProxySettings_NoProxy value) noProxy,
|
||||
required TResult Function(ProxySettings_CustomProxyList value)
|
||||
customProxyList,
|
||||
customProxyList,
|
||||
}) {
|
||||
return noProxy(this);
|
||||
}
|
||||
|
|
@ -187,36 +190,36 @@ abstract class ProxySettings_NoProxy extends ProxySettings {
|
|||
/// @nodoc
|
||||
abstract class _$$ProxySettings_CustomProxyListImplCopyWith<$Res> {
|
||||
factory _$$ProxySettings_CustomProxyListImplCopyWith(
|
||||
_$ProxySettings_CustomProxyListImpl value,
|
||||
$Res Function(_$ProxySettings_CustomProxyListImpl) then,
|
||||
) = __$$ProxySettings_CustomProxyListImplCopyWithImpl<$Res>;
|
||||
_$ProxySettings_CustomProxyListImpl value,
|
||||
$Res Function(_$ProxySettings_CustomProxyListImpl) then) =
|
||||
__$$ProxySettings_CustomProxyListImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({List<CustomProxy> field0});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProxySettings_CustomProxyListImplCopyWithImpl<$Res>
|
||||
extends
|
||||
_$ProxySettingsCopyWithImpl<$Res, _$ProxySettings_CustomProxyListImpl>
|
||||
extends _$ProxySettingsCopyWithImpl<$Res,
|
||||
_$ProxySettings_CustomProxyListImpl>
|
||||
implements _$$ProxySettings_CustomProxyListImplCopyWith<$Res> {
|
||||
__$$ProxySettings_CustomProxyListImplCopyWithImpl(
|
||||
_$ProxySettings_CustomProxyListImpl _value,
|
||||
$Res Function(_$ProxySettings_CustomProxyListImpl) _then,
|
||||
) : super(_value, _then);
|
||||
_$ProxySettings_CustomProxyListImpl _value,
|
||||
$Res Function(_$ProxySettings_CustomProxyListImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProxySettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? field0 = null}) {
|
||||
return _then(
|
||||
_$ProxySettings_CustomProxyListImpl(
|
||||
null == field0
|
||||
? _value._field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as List<CustomProxy>,
|
||||
),
|
||||
);
|
||||
$Res call({
|
||||
Object? field0 = null,
|
||||
}) {
|
||||
return _then(_$ProxySettings_CustomProxyListImpl(
|
||||
null == field0
|
||||
? _value._field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as List<CustomProxy>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -225,8 +228,8 @@ class __$$ProxySettings_CustomProxyListImplCopyWithImpl<$Res>
|
|||
class _$ProxySettings_CustomProxyListImpl
|
||||
extends ProxySettings_CustomProxyList {
|
||||
const _$ProxySettings_CustomProxyListImpl(final List<CustomProxy> field0)
|
||||
: _field0 = field0,
|
||||
super._();
|
||||
: _field0 = field0,
|
||||
super._();
|
||||
|
||||
final List<CustomProxy> _field0;
|
||||
@override
|
||||
|
|
@ -259,11 +262,9 @@ class _$ProxySettings_CustomProxyListImpl
|
|||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProxySettings_CustomProxyListImplCopyWith<
|
||||
_$ProxySettings_CustomProxyListImpl
|
||||
>
|
||||
get copyWith => __$$ProxySettings_CustomProxyListImplCopyWithImpl<
|
||||
_$ProxySettings_CustomProxyListImpl
|
||||
>(this, _$identity);
|
||||
_$ProxySettings_CustomProxyListImpl>
|
||||
get copyWith => __$$ProxySettings_CustomProxyListImplCopyWithImpl<
|
||||
_$ProxySettings_CustomProxyListImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
|
|
@ -301,7 +302,7 @@ class _$ProxySettings_CustomProxyListImpl
|
|||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(ProxySettings_NoProxy value) noProxy,
|
||||
required TResult Function(ProxySettings_CustomProxyList value)
|
||||
customProxyList,
|
||||
customProxyList,
|
||||
}) {
|
||||
return customProxyList(this);
|
||||
}
|
||||
|
|
@ -340,9 +341,8 @@ abstract class ProxySettings_CustomProxyList extends ProxySettings {
|
|||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProxySettings_CustomProxyListImplCopyWith<
|
||||
_$ProxySettings_CustomProxyListImpl
|
||||
>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$ProxySettings_CustomProxyListImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
|
@ -351,44 +351,49 @@ mixin _$RedirectSettings {
|
|||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() noRedirect,
|
||||
required TResult Function(int field0) limitedRedirects,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? noRedirect,
|
||||
TResult? Function(int field0)? limitedRedirects,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? noRedirect,
|
||||
TResult Function(int field0)? limitedRedirects,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(RedirectSettings_NoRedirect value) noRedirect,
|
||||
required TResult Function(RedirectSettings_LimitedRedirects value)
|
||||
limitedRedirects,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
limitedRedirects,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(RedirectSettings_NoRedirect value)? noRedirect,
|
||||
TResult? Function(RedirectSettings_LimitedRedirects value)?
|
||||
limitedRedirects,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
limitedRedirects,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(RedirectSettings_NoRedirect value)? noRedirect,
|
||||
TResult Function(RedirectSettings_LimitedRedirects value)? limitedRedirects,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RedirectSettingsCopyWith<$Res> {
|
||||
factory $RedirectSettingsCopyWith(
|
||||
RedirectSettings value,
|
||||
$Res Function(RedirectSettings) then,
|
||||
) = _$RedirectSettingsCopyWithImpl<$Res, RedirectSettings>;
|
||||
RedirectSettings value, $Res Function(RedirectSettings) then) =
|
||||
_$RedirectSettingsCopyWithImpl<$Res, RedirectSettings>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
|
@ -408,20 +413,20 @@ class _$RedirectSettingsCopyWithImpl<$Res, $Val extends RedirectSettings>
|
|||
/// @nodoc
|
||||
abstract class _$$RedirectSettings_NoRedirectImplCopyWith<$Res> {
|
||||
factory _$$RedirectSettings_NoRedirectImplCopyWith(
|
||||
_$RedirectSettings_NoRedirectImpl value,
|
||||
$Res Function(_$RedirectSettings_NoRedirectImpl) then,
|
||||
) = __$$RedirectSettings_NoRedirectImplCopyWithImpl<$Res>;
|
||||
_$RedirectSettings_NoRedirectImpl value,
|
||||
$Res Function(_$RedirectSettings_NoRedirectImpl) then) =
|
||||
__$$RedirectSettings_NoRedirectImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RedirectSettings_NoRedirectImplCopyWithImpl<$Res>
|
||||
extends
|
||||
_$RedirectSettingsCopyWithImpl<$Res, _$RedirectSettings_NoRedirectImpl>
|
||||
extends _$RedirectSettingsCopyWithImpl<$Res,
|
||||
_$RedirectSettings_NoRedirectImpl>
|
||||
implements _$$RedirectSettings_NoRedirectImplCopyWith<$Res> {
|
||||
__$$RedirectSettings_NoRedirectImplCopyWithImpl(
|
||||
_$RedirectSettings_NoRedirectImpl _value,
|
||||
$Res Function(_$RedirectSettings_NoRedirectImpl) _then,
|
||||
) : super(_value, _then);
|
||||
_$RedirectSettings_NoRedirectImpl _value,
|
||||
$Res Function(_$RedirectSettings_NoRedirectImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RedirectSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -483,7 +488,7 @@ class _$RedirectSettings_NoRedirectImpl extends RedirectSettings_NoRedirect {
|
|||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(RedirectSettings_NoRedirect value) noRedirect,
|
||||
required TResult Function(RedirectSettings_LimitedRedirects value)
|
||||
limitedRedirects,
|
||||
limitedRedirects,
|
||||
}) {
|
||||
return noRedirect(this);
|
||||
}
|
||||
|
|
@ -493,7 +498,7 @@ class _$RedirectSettings_NoRedirectImpl extends RedirectSettings_NoRedirect {
|
|||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(RedirectSettings_NoRedirect value)? noRedirect,
|
||||
TResult? Function(RedirectSettings_LimitedRedirects value)?
|
||||
limitedRedirects,
|
||||
limitedRedirects,
|
||||
}) {
|
||||
return noRedirect?.call(this);
|
||||
}
|
||||
|
|
@ -521,39 +526,36 @@ abstract class RedirectSettings_NoRedirect extends RedirectSettings {
|
|||
/// @nodoc
|
||||
abstract class _$$RedirectSettings_LimitedRedirectsImplCopyWith<$Res> {
|
||||
factory _$$RedirectSettings_LimitedRedirectsImplCopyWith(
|
||||
_$RedirectSettings_LimitedRedirectsImpl value,
|
||||
$Res Function(_$RedirectSettings_LimitedRedirectsImpl) then,
|
||||
) = __$$RedirectSettings_LimitedRedirectsImplCopyWithImpl<$Res>;
|
||||
_$RedirectSettings_LimitedRedirectsImpl value,
|
||||
$Res Function(_$RedirectSettings_LimitedRedirectsImpl) then) =
|
||||
__$$RedirectSettings_LimitedRedirectsImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({int field0});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RedirectSettings_LimitedRedirectsImplCopyWithImpl<$Res>
|
||||
extends
|
||||
_$RedirectSettingsCopyWithImpl<
|
||||
$Res,
|
||||
_$RedirectSettings_LimitedRedirectsImpl
|
||||
>
|
||||
extends _$RedirectSettingsCopyWithImpl<$Res,
|
||||
_$RedirectSettings_LimitedRedirectsImpl>
|
||||
implements _$$RedirectSettings_LimitedRedirectsImplCopyWith<$Res> {
|
||||
__$$RedirectSettings_LimitedRedirectsImplCopyWithImpl(
|
||||
_$RedirectSettings_LimitedRedirectsImpl _value,
|
||||
$Res Function(_$RedirectSettings_LimitedRedirectsImpl) _then,
|
||||
) : super(_value, _then);
|
||||
_$RedirectSettings_LimitedRedirectsImpl _value,
|
||||
$Res Function(_$RedirectSettings_LimitedRedirectsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RedirectSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? field0 = null}) {
|
||||
return _then(
|
||||
_$RedirectSettings_LimitedRedirectsImpl(
|
||||
null == field0
|
||||
? _value.field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
$Res call({
|
||||
Object? field0 = null,
|
||||
}) {
|
||||
return _then(_$RedirectSettings_LimitedRedirectsImpl(
|
||||
null == field0
|
||||
? _value.field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -588,11 +590,9 @@ class _$RedirectSettings_LimitedRedirectsImpl
|
|||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RedirectSettings_LimitedRedirectsImplCopyWith<
|
||||
_$RedirectSettings_LimitedRedirectsImpl
|
||||
>
|
||||
get copyWith => __$$RedirectSettings_LimitedRedirectsImplCopyWithImpl<
|
||||
_$RedirectSettings_LimitedRedirectsImpl
|
||||
>(this, _$identity);
|
||||
_$RedirectSettings_LimitedRedirectsImpl>
|
||||
get copyWith => __$$RedirectSettings_LimitedRedirectsImplCopyWithImpl<
|
||||
_$RedirectSettings_LimitedRedirectsImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
|
|
@ -630,7 +630,7 @@ class _$RedirectSettings_LimitedRedirectsImpl
|
|||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(RedirectSettings_NoRedirect value) noRedirect,
|
||||
required TResult Function(RedirectSettings_LimitedRedirects value)
|
||||
limitedRedirects,
|
||||
limitedRedirects,
|
||||
}) {
|
||||
return limitedRedirects(this);
|
||||
}
|
||||
|
|
@ -640,7 +640,7 @@ class _$RedirectSettings_LimitedRedirectsImpl
|
|||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(RedirectSettings_NoRedirect value)? noRedirect,
|
||||
TResult? Function(RedirectSettings_LimitedRedirects value)?
|
||||
limitedRedirects,
|
||||
limitedRedirects,
|
||||
}) {
|
||||
return limitedRedirects?.call(this);
|
||||
}
|
||||
|
|
@ -670,7 +670,6 @@ abstract class RedirectSettings_LimitedRedirects extends RedirectSettings {
|
|||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RedirectSettings_LimitedRedirectsImplCopyWith<
|
||||
_$RedirectSettings_LimitedRedirectsImpl
|
||||
>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$RedirectSettings_LimitedRedirectsImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -12,8 +12,7 @@ part of 'http.dart';
|
|||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$HttpHeaders {
|
||||
|
|
@ -22,42 +21,47 @@ mixin _$HttpHeaders {
|
|||
TResult when<TResult extends Object?>({
|
||||
required TResult Function(Map<String, String> field0) map,
|
||||
required TResult Function(List<(String, String)> field0) list,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function(Map<String, String> field0)? map,
|
||||
TResult? Function(List<(String, String)> field0)? list,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function(Map<String, String> field0)? map,
|
||||
TResult Function(List<(String, String)> field0)? list,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(HttpHeaders_Map value) map,
|
||||
required TResult Function(HttpHeaders_List value) list,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(HttpHeaders_Map value)? map,
|
||||
TResult? Function(HttpHeaders_List value)? list,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(HttpHeaders_Map value)? map,
|
||||
TResult Function(HttpHeaders_List value)? list,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $HttpHeadersCopyWith<$Res> {
|
||||
factory $HttpHeadersCopyWith(
|
||||
HttpHeaders value,
|
||||
$Res Function(HttpHeaders) then,
|
||||
) = _$HttpHeadersCopyWithImpl<$Res, HttpHeaders>;
|
||||
HttpHeaders value, $Res Function(HttpHeaders) then) =
|
||||
_$HttpHeadersCopyWithImpl<$Res, HttpHeaders>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
|
@ -76,10 +80,9 @@ class _$HttpHeadersCopyWithImpl<$Res, $Val extends HttpHeaders>
|
|||
|
||||
/// @nodoc
|
||||
abstract class _$$HttpHeaders_MapImplCopyWith<$Res> {
|
||||
factory _$$HttpHeaders_MapImplCopyWith(
|
||||
_$HttpHeaders_MapImpl value,
|
||||
$Res Function(_$HttpHeaders_MapImpl) then,
|
||||
) = __$$HttpHeaders_MapImplCopyWithImpl<$Res>;
|
||||
factory _$$HttpHeaders_MapImplCopyWith(_$HttpHeaders_MapImpl value,
|
||||
$Res Function(_$HttpHeaders_MapImpl) then) =
|
||||
__$$HttpHeaders_MapImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({Map<String, String> field0});
|
||||
}
|
||||
|
|
@ -89,23 +92,22 @@ class __$$HttpHeaders_MapImplCopyWithImpl<$Res>
|
|||
extends _$HttpHeadersCopyWithImpl<$Res, _$HttpHeaders_MapImpl>
|
||||
implements _$$HttpHeaders_MapImplCopyWith<$Res> {
|
||||
__$$HttpHeaders_MapImplCopyWithImpl(
|
||||
_$HttpHeaders_MapImpl _value,
|
||||
$Res Function(_$HttpHeaders_MapImpl) _then,
|
||||
) : super(_value, _then);
|
||||
_$HttpHeaders_MapImpl _value, $Res Function(_$HttpHeaders_MapImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of HttpHeaders
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? field0 = null}) {
|
||||
return _then(
|
||||
_$HttpHeaders_MapImpl(
|
||||
null == field0
|
||||
? _value._field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, String>,
|
||||
),
|
||||
);
|
||||
$Res call({
|
||||
Object? field0 = null,
|
||||
}) {
|
||||
return _then(_$HttpHeaders_MapImpl(
|
||||
null == field0
|
||||
? _value._field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, String>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -113,8 +115,8 @@ class __$$HttpHeaders_MapImplCopyWithImpl<$Res>
|
|||
|
||||
class _$HttpHeaders_MapImpl extends HttpHeaders_Map {
|
||||
const _$HttpHeaders_MapImpl(final Map<String, String> field0)
|
||||
: _field0 = field0,
|
||||
super._();
|
||||
: _field0 = field0,
|
||||
super._();
|
||||
|
||||
final Map<String, String> _field0;
|
||||
@override
|
||||
|
|
@ -148,9 +150,7 @@ class _$HttpHeaders_MapImpl extends HttpHeaders_Map {
|
|||
@pragma('vm:prefer-inline')
|
||||
_$$HttpHeaders_MapImplCopyWith<_$HttpHeaders_MapImpl> get copyWith =>
|
||||
__$$HttpHeaders_MapImplCopyWithImpl<_$HttpHeaders_MapImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
|
|
@ -232,10 +232,9 @@ abstract class HttpHeaders_Map extends HttpHeaders {
|
|||
|
||||
/// @nodoc
|
||||
abstract class _$$HttpHeaders_ListImplCopyWith<$Res> {
|
||||
factory _$$HttpHeaders_ListImplCopyWith(
|
||||
_$HttpHeaders_ListImpl value,
|
||||
$Res Function(_$HttpHeaders_ListImpl) then,
|
||||
) = __$$HttpHeaders_ListImplCopyWithImpl<$Res>;
|
||||
factory _$$HttpHeaders_ListImplCopyWith(_$HttpHeaders_ListImpl value,
|
||||
$Res Function(_$HttpHeaders_ListImpl) then) =
|
||||
__$$HttpHeaders_ListImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({List<(String, String)> field0});
|
||||
}
|
||||
|
|
@ -244,24 +243,23 @@ abstract class _$$HttpHeaders_ListImplCopyWith<$Res> {
|
|||
class __$$HttpHeaders_ListImplCopyWithImpl<$Res>
|
||||
extends _$HttpHeadersCopyWithImpl<$Res, _$HttpHeaders_ListImpl>
|
||||
implements _$$HttpHeaders_ListImplCopyWith<$Res> {
|
||||
__$$HttpHeaders_ListImplCopyWithImpl(
|
||||
_$HttpHeaders_ListImpl _value,
|
||||
$Res Function(_$HttpHeaders_ListImpl) _then,
|
||||
) : super(_value, _then);
|
||||
__$$HttpHeaders_ListImplCopyWithImpl(_$HttpHeaders_ListImpl _value,
|
||||
$Res Function(_$HttpHeaders_ListImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of HttpHeaders
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? field0 = null}) {
|
||||
return _then(
|
||||
_$HttpHeaders_ListImpl(
|
||||
null == field0
|
||||
? _value._field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as List<(String, String)>,
|
||||
),
|
||||
);
|
||||
$Res call({
|
||||
Object? field0 = null,
|
||||
}) {
|
||||
return _then(_$HttpHeaders_ListImpl(
|
||||
null == field0
|
||||
? _value._field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as List<(String, String)>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -269,8 +267,8 @@ class __$$HttpHeaders_ListImplCopyWithImpl<$Res>
|
|||
|
||||
class _$HttpHeaders_ListImpl extends HttpHeaders_List {
|
||||
const _$HttpHeaders_ListImpl(final List<(String, String)> field0)
|
||||
: _field0 = field0,
|
||||
super._();
|
||||
: _field0 = field0,
|
||||
super._();
|
||||
|
||||
final List<(String, String)> _field0;
|
||||
@override
|
||||
|
|
@ -304,9 +302,7 @@ class _$HttpHeaders_ListImpl extends HttpHeaders_List {
|
|||
@pragma('vm:prefer-inline')
|
||||
_$$HttpHeaders_ListImplCopyWith<_$HttpHeaders_ListImpl> get copyWith =>
|
||||
__$$HttpHeaders_ListImplCopyWithImpl<_$HttpHeaders_ListImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
|
|
@ -393,47 +389,52 @@ mixin _$HttpResponseBody {
|
|||
required TResult Function(String field0) text,
|
||||
required TResult Function(Uint8List field0) bytes,
|
||||
required TResult Function() stream,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function(String field0)? text,
|
||||
TResult? Function(Uint8List field0)? bytes,
|
||||
TResult? Function()? stream,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function(String field0)? text,
|
||||
TResult Function(Uint8List field0)? bytes,
|
||||
TResult Function()? stream,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(HttpResponseBody_Text value) text,
|
||||
required TResult Function(HttpResponseBody_Bytes value) bytes,
|
||||
required TResult Function(HttpResponseBody_Stream value) stream,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(HttpResponseBody_Text value)? text,
|
||||
TResult? Function(HttpResponseBody_Bytes value)? bytes,
|
||||
TResult? Function(HttpResponseBody_Stream value)? stream,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(HttpResponseBody_Text value)? text,
|
||||
TResult Function(HttpResponseBody_Bytes value)? bytes,
|
||||
TResult Function(HttpResponseBody_Stream value)? stream,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $HttpResponseBodyCopyWith<$Res> {
|
||||
factory $HttpResponseBodyCopyWith(
|
||||
HttpResponseBody value,
|
||||
$Res Function(HttpResponseBody) then,
|
||||
) = _$HttpResponseBodyCopyWithImpl<$Res, HttpResponseBody>;
|
||||
HttpResponseBody value, $Res Function(HttpResponseBody) then) =
|
||||
_$HttpResponseBodyCopyWithImpl<$Res, HttpResponseBody>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
|
@ -453,9 +454,9 @@ class _$HttpResponseBodyCopyWithImpl<$Res, $Val extends HttpResponseBody>
|
|||
/// @nodoc
|
||||
abstract class _$$HttpResponseBody_TextImplCopyWith<$Res> {
|
||||
factory _$$HttpResponseBody_TextImplCopyWith(
|
||||
_$HttpResponseBody_TextImpl value,
|
||||
$Res Function(_$HttpResponseBody_TextImpl) then,
|
||||
) = __$$HttpResponseBody_TextImplCopyWithImpl<$Res>;
|
||||
_$HttpResponseBody_TextImpl value,
|
||||
$Res Function(_$HttpResponseBody_TextImpl) then) =
|
||||
__$$HttpResponseBody_TextImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String field0});
|
||||
}
|
||||
|
|
@ -464,24 +465,23 @@ abstract class _$$HttpResponseBody_TextImplCopyWith<$Res> {
|
|||
class __$$HttpResponseBody_TextImplCopyWithImpl<$Res>
|
||||
extends _$HttpResponseBodyCopyWithImpl<$Res, _$HttpResponseBody_TextImpl>
|
||||
implements _$$HttpResponseBody_TextImplCopyWith<$Res> {
|
||||
__$$HttpResponseBody_TextImplCopyWithImpl(
|
||||
_$HttpResponseBody_TextImpl _value,
|
||||
$Res Function(_$HttpResponseBody_TextImpl) _then,
|
||||
) : super(_value, _then);
|
||||
__$$HttpResponseBody_TextImplCopyWithImpl(_$HttpResponseBody_TextImpl _value,
|
||||
$Res Function(_$HttpResponseBody_TextImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of HttpResponseBody
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? field0 = null}) {
|
||||
return _then(
|
||||
_$HttpResponseBody_TextImpl(
|
||||
null == field0
|
||||
? _value.field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
$Res call({
|
||||
Object? field0 = null,
|
||||
}) {
|
||||
return _then(_$HttpResponseBody_TextImpl(
|
||||
null == field0
|
||||
? _value.field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -515,11 +515,8 @@ class _$HttpResponseBody_TextImpl extends HttpResponseBody_Text {
|
|||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$HttpResponseBody_TextImplCopyWith<_$HttpResponseBody_TextImpl>
|
||||
get copyWith =>
|
||||
__$$HttpResponseBody_TextImplCopyWithImpl<_$HttpResponseBody_TextImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
get copyWith => __$$HttpResponseBody_TextImplCopyWithImpl<
|
||||
_$HttpResponseBody_TextImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
|
|
@ -601,15 +598,15 @@ abstract class HttpResponseBody_Text extends HttpResponseBody {
|
|||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$HttpResponseBody_TextImplCopyWith<_$HttpResponseBody_TextImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$HttpResponseBody_BytesImplCopyWith<$Res> {
|
||||
factory _$$HttpResponseBody_BytesImplCopyWith(
|
||||
_$HttpResponseBody_BytesImpl value,
|
||||
$Res Function(_$HttpResponseBody_BytesImpl) then,
|
||||
) = __$$HttpResponseBody_BytesImplCopyWithImpl<$Res>;
|
||||
_$HttpResponseBody_BytesImpl value,
|
||||
$Res Function(_$HttpResponseBody_BytesImpl) then) =
|
||||
__$$HttpResponseBody_BytesImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({Uint8List field0});
|
||||
}
|
||||
|
|
@ -619,23 +616,23 @@ class __$$HttpResponseBody_BytesImplCopyWithImpl<$Res>
|
|||
extends _$HttpResponseBodyCopyWithImpl<$Res, _$HttpResponseBody_BytesImpl>
|
||||
implements _$$HttpResponseBody_BytesImplCopyWith<$Res> {
|
||||
__$$HttpResponseBody_BytesImplCopyWithImpl(
|
||||
_$HttpResponseBody_BytesImpl _value,
|
||||
$Res Function(_$HttpResponseBody_BytesImpl) _then,
|
||||
) : super(_value, _then);
|
||||
_$HttpResponseBody_BytesImpl _value,
|
||||
$Res Function(_$HttpResponseBody_BytesImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of HttpResponseBody
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? field0 = null}) {
|
||||
return _then(
|
||||
_$HttpResponseBody_BytesImpl(
|
||||
null == field0
|
||||
? _value.field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as Uint8List,
|
||||
),
|
||||
);
|
||||
$Res call({
|
||||
Object? field0 = null,
|
||||
}) {
|
||||
return _then(_$HttpResponseBody_BytesImpl(
|
||||
null == field0
|
||||
? _value.field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as Uint8List,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -670,11 +667,8 @@ class _$HttpResponseBody_BytesImpl extends HttpResponseBody_Bytes {
|
|||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$HttpResponseBody_BytesImplCopyWith<_$HttpResponseBody_BytesImpl>
|
||||
get copyWith =>
|
||||
__$$HttpResponseBody_BytesImplCopyWithImpl<_$HttpResponseBody_BytesImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
get copyWith => __$$HttpResponseBody_BytesImplCopyWithImpl<
|
||||
_$HttpResponseBody_BytesImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
|
|
@ -756,15 +750,15 @@ abstract class HttpResponseBody_Bytes extends HttpResponseBody {
|
|||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$HttpResponseBody_BytesImplCopyWith<_$HttpResponseBody_BytesImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$HttpResponseBody_StreamImplCopyWith<$Res> {
|
||||
factory _$$HttpResponseBody_StreamImplCopyWith(
|
||||
_$HttpResponseBody_StreamImpl value,
|
||||
$Res Function(_$HttpResponseBody_StreamImpl) then,
|
||||
) = __$$HttpResponseBody_StreamImplCopyWithImpl<$Res>;
|
||||
_$HttpResponseBody_StreamImpl value,
|
||||
$Res Function(_$HttpResponseBody_StreamImpl) then) =
|
||||
__$$HttpResponseBody_StreamImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
|
@ -772,9 +766,9 @@ class __$$HttpResponseBody_StreamImplCopyWithImpl<$Res>
|
|||
extends _$HttpResponseBodyCopyWithImpl<$Res, _$HttpResponseBody_StreamImpl>
|
||||
implements _$$HttpResponseBody_StreamImplCopyWith<$Res> {
|
||||
__$$HttpResponseBody_StreamImplCopyWithImpl(
|
||||
_$HttpResponseBody_StreamImpl _value,
|
||||
$Res Function(_$HttpResponseBody_StreamImpl) _then,
|
||||
) : super(_value, _then);
|
||||
_$HttpResponseBody_StreamImpl _value,
|
||||
$Res Function(_$HttpResponseBody_StreamImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of HttpResponseBody
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
|
|||
|
|
@ -31,3 +31,37 @@ Widget cachedNetworkImage({
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget cachedCompressedNetworkImage({
|
||||
Map<String, String>? headers,
|
||||
required String imageUrl,
|
||||
required double? width,
|
||||
required double? height,
|
||||
required BoxFit? fit,
|
||||
AlignmentGeometry? alignment,
|
||||
bool useCustomNetworkImage = true,
|
||||
Widget errorWidget = const Icon(Icons.error, size: 50),
|
||||
int maxBytes = 5 << 10,
|
||||
}) {
|
||||
return ExtendedImage(
|
||||
image: ExtendedResizeImage(
|
||||
useCustomNetworkImage
|
||||
? CustomExtendedNetworkImageProvider(imageUrl, headers: headers)
|
||||
: ExtendedNetworkImageProvider(imageUrl, headers: headers),
|
||||
maxBytes: maxBytes,
|
||||
),
|
||||
width: width,
|
||||
height: height,
|
||||
fit: fit,
|
||||
filterQuality: FilterQuality.medium,
|
||||
mode: ExtendedImageMode.gesture,
|
||||
handleLoadingProgress: true,
|
||||
clearMemoryCacheWhenDispose: true,
|
||||
loadStateChanged: (state) {
|
||||
if (state.extendedImageLoadState == LoadState.failed) {
|
||||
return errorWidget;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import app_links
|
|||
import audio_session
|
||||
import connectivity_plus
|
||||
import device_info_plus
|
||||
import file_picker
|
||||
import flutter_inappwebview_macos
|
||||
import flutter_qjs
|
||||
import flutter_web_auth_2
|
||||
|
|
@ -35,6 +36,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
|
||||
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
|
||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||
FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin"))
|
||||
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
|
||||
FlutterQjsPlugin.register(with: registry.registrar(forPlugin: "FlutterQjsPlugin"))
|
||||
FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin"))
|
||||
|
|
|
|||
52
pubspec.lock
52
pubspec.lock
|
|
@ -467,18 +467,18 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: extended_image
|
||||
sha256: "85199f9233e03abc2ce2e68cbb2991648666af4a527ae4e6250935be8edfddae"
|
||||
sha256: fcefcf3cba32696c639e9e305a790039709d05a7139320b91bb9d300993452e2
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.1.0"
|
||||
version: "10.0.0"
|
||||
extended_image_library:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: extended_image_library
|
||||
sha256: e61dafd94400fff6ef7ed1523d445ff3af137f198f3228e4a3107bc5b4bec5d1
|
||||
sha256: ae468c31c375064964de11cbb31310a58c4462df6e3bae1a0bc0066f586795d5
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.6"
|
||||
version: "5.0.0"
|
||||
fading_edge_scrollview:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -523,10 +523,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: file_picker
|
||||
sha256: "16dc141db5a2ccc6520ebb6a2eb5945b1b09e95085c021d9f914f8ded7f1465c"
|
||||
sha256: "36a1652d99cb6bf8ccc8b9f43aded1fd60b234d23ce78af422c07f950a436ef7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.1.4"
|
||||
version: "10.0.0"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -560,10 +560,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_app_installer
|
||||
sha256: b71f7c3f6c5712b6f9bdcde798bbb8a0c4047cab47c4364f7252de8c95d67358
|
||||
sha256: "2243cf0e58d6f126420a800fcd06e7c5b3a048c5551914a006b29575125d8dc0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.0.1"
|
||||
flutter_cache_manager:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -640,10 +640,10 @@ packages:
|
|||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_launcher_icons
|
||||
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
|
||||
sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.13.1"
|
||||
version: "0.14.3"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
@ -873,10 +873,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: html
|
||||
sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec"
|
||||
sha256: "9475be233c437f0e3637af55e7702cbbe5c23a68bd56e8a5fa2d426297b7c6c8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.15.5"
|
||||
version: "0.15.5+1"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -937,10 +937,10 @@ packages:
|
|||
dependency: "direct dev"
|
||||
description:
|
||||
name: inno_bundle
|
||||
sha256: e9d0ab41a82157da42ebd4206bda22ed04bf096a6e7d416c79d79201c388d563
|
||||
sha256: "544ca69ce64c5b06b346f328170ae407ca99605beab23ccc779b39acf6ba1c9a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.0"
|
||||
version: "0.9.0"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1057,18 +1057,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: just_audio_platform_interface
|
||||
sha256: "271b93b484c6f494ecd72a107fffbdb26b425f170c665b9777a0a24a726f2f24"
|
||||
sha256: "4cd94536af0219fa306205a58e78d67e02b0555283c1c094ee41e402a14a5c4a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.4.0"
|
||||
version: "4.5.0"
|
||||
just_audio_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: just_audio_web
|
||||
sha256: "58915be64509a7683c44bf11cd1a23c15a48de104927bee116e3c63c8eeea0d4"
|
||||
sha256: "8c7e779892e180cbc9ffb5a3c52f6e90e1cbbf4a63694cc450972a7edbd2bb6d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.14"
|
||||
version: "0.4.15"
|
||||
lazy_memo:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1465,18 +1465,18 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: protobuf
|
||||
sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d"
|
||||
sha256: fbb0c37d435641d0b84813c1dad41e6fa61ddc880a320bce16b3063ecec35aa6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
version: "4.0.0"
|
||||
protoc_plugin:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: protoc_plugin
|
||||
sha256: fb0554851c9eca30bd18405fbbfe81e39166d4a2f0e5b770606fd69da3da0b2f
|
||||
sha256: cdec62ff876e61f4421aa7c87373c91db9b1430c748b38fb6d23613356064375
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "21.1.2"
|
||||
version: "22.0.1"
|
||||
provider:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1529,10 +1529,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: re_editor
|
||||
sha256: "2169c114c7877bcaae72d6e8b69cdaa2a9cded69a51e3cf26209dad4a3ed2b9c"
|
||||
sha256: "17e430f0591dd361992ec2dd6f69191c1853fa46e05432e095310a8f82ee820e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.0"
|
||||
version: "0.7.0"
|
||||
re_highlight:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1933,10 +1933,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626"
|
||||
sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.2"
|
||||
version: "6.3.3"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
14
pubspec.yaml
14
pubspec.yaml
|
|
@ -18,7 +18,7 @@ dependencies:
|
|||
font_awesome_flutter: ^10.8.0
|
||||
expandable_text: ^2.3.0
|
||||
flex_color_scheme: ^8.1.0
|
||||
extended_image: ^9.1.0
|
||||
extended_image: ^10.0.0
|
||||
photo_view: ^0.15.0
|
||||
grouped_list: ^6.0.0
|
||||
intl: ^0.19.0
|
||||
|
|
@ -33,7 +33,7 @@ dependencies:
|
|||
share_plus: ^10.0.2
|
||||
xpath_selector_html_parser: ^3.0.1
|
||||
archive: ^4.0.1
|
||||
file_picker: 8.1.4
|
||||
file_picker: ^10.0.0
|
||||
path_provider: ^2.1.5
|
||||
scrollable_positioned_list: ^0.3.8
|
||||
dart_eval: ^0.7.10
|
||||
|
|
@ -57,7 +57,7 @@ dependencies:
|
|||
url: https://github.com/kodjodevf/flutter_qjs.git
|
||||
ref: main
|
||||
http: ^1.3.0
|
||||
re_editor: ^0.6.0
|
||||
re_editor: ^0.7.0
|
||||
re_highlight: ^0.0.3
|
||||
json_view: ^0.4.2
|
||||
super_sliver_list: ^0.4.1
|
||||
|
|
@ -78,7 +78,7 @@ dependencies:
|
|||
connectivity_plus: ^6.1.3
|
||||
app_links: ^6.4.0
|
||||
win32: ^5.10.1
|
||||
protobuf: ^3.1.0
|
||||
protobuf: ^4.0.0
|
||||
device_info_plus: ^11.3.3
|
||||
flutter_app_installer: ^1.0.0
|
||||
marquee: ^2.2.3
|
||||
|
|
@ -99,12 +99,12 @@ dev_dependencies:
|
|||
sdk: flutter
|
||||
build_runner: ^2.4.6
|
||||
riverpod_generator: ^2.6.3
|
||||
flutter_launcher_icons: ^0.13.1
|
||||
flutter_launcher_icons: ^0.14.3
|
||||
isar_generator: ^3.1.0+1
|
||||
flutter_lints: ^5.0.0
|
||||
freezed: ^2.0.0
|
||||
inno_bundle: ^0.8.0
|
||||
protoc_plugin: ^21.1.2
|
||||
inno_bundle: ^0.9.0
|
||||
protoc_plugin: ^22.0.1
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue