change app icon , code refactor , add anime download path
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 25 KiB |
BIN
assets/app_icons/icon-black.png
Normal file
|
After Width: | Height: | Size: 435 KiB |
BIN
assets/app_icons/icon-red.png
Normal file
|
After Width: | Height: | Size: 489 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 347 KiB |
|
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 904 B |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 19 KiB |
|
|
@ -370,4 +370,5 @@ class GetArchiveDataFromFileProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ part of 'fetch_anime_sources.dart';
|
|||
// **************************************************************************
|
||||
|
||||
String _$fetchAnimeSourcesListHash() =>
|
||||
r'1b16436684b132a5dc6db2159e38200f1dc9b11e';
|
||||
r'c6d2c5cd85d0086160d7af66e9f7f07da7dcbc53';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -110,4 +110,5 @@ class FetchAnimeSourcesListProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ part of 'fetch_manga_sources.dart';
|
|||
// **************************************************************************
|
||||
|
||||
String _$fetchMangaSourcesListHash() =>
|
||||
r'82665771175f4fea39c0dee77d06d568737ea989';
|
||||
r'5a17379eb08d01c945d9f307361f3dad40140ff0';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -110,4 +110,5 @@ class FetchMangaSourcesListProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -111,4 +111,5 @@ class GetAllHistoryStreamProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -206,4 +206,5 @@ class GetAllMangaWithoutCategoriesStreamProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -1607,4 +1607,5 @@ class MangasSetUnReadStateProvider
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -128,4 +128,5 @@ class ImportArchivesFromFileProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -26,9 +26,11 @@ class _MangaReaderDetailState extends ConsumerState<MangaReaderDetail> {
|
|||
await ref.read(
|
||||
updateMangaDetailProvider(mangaId: widget.mangaId, isInit: true)
|
||||
.future);
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
bool _isLoading = true;
|
||||
|
|
|
|||
|
|
@ -193,4 +193,5 @@ class GetChaptersStreamProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -979,4 +979,5 @@ class ScanlatorsFilterStateProvider extends AutoDisposeNotifierProviderImpl<
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -135,4 +135,5 @@ class TrackStateProvider
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'update_manga_detail_providers.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$updateMangaDetailHash() => r'143fc36898ba2d83ee6d42d71b01077ce33dcb19';
|
||||
String _$updateMangaDetailHash() => r'a3246056de02a353e9c6280f28569bd2c9ad18cb';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -118,4 +118,5 @@ class UpdateMangaDetailProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -134,4 +134,5 @@ class ConvertToCBZProvider extends AutoDisposeFutureProvider<List<String>> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ Future<List<String>> downloadChapter(
|
|||
String scanlator = chapter.scanlator!.isNotEmpty
|
||||
? "${chapter.scanlator!.replaceAll(regExp, '_')}_"
|
||||
: "";
|
||||
final isManga = chapter.manga.value!.isManga!;
|
||||
final finalPath =
|
||||
"downloads/${manga.source} (${manga.lang!.toUpperCase()})/${manga.name!.replaceAll(regExp, '_')}/$scanlator${chapter.name!.replaceAll(regExp, '_')}";
|
||||
"downloads/${isManga ? "Manga" : "Anime"}/${manga.source} (${manga.lang!.toUpperCase()})/${manga.name!.replaceAll(regExp, '_')}/$scanlator${chapter.name!.replaceAll(regExp, '_')}";
|
||||
path = Directory("${path1!.path}$finalPath/");
|
||||
ref
|
||||
.read(getChapterUrlProvider(
|
||||
|
|
@ -63,8 +64,10 @@ Future<List<String>> downloadChapter(
|
|||
if (!cbzFileExist) {
|
||||
for (var index = 0; index < pageUrls.length; index++) {
|
||||
final path2 = Directory("${path1.path}downloads/");
|
||||
final path5 =
|
||||
Directory("${path1.path}downloads/${isManga ? "Manga" : "Anime"}/");
|
||||
final path4 = Directory(
|
||||
"${path2.path}${manga.source} (${manga.lang!.toUpperCase()})/");
|
||||
"${path5.path}${manga.source} (${manga.lang!.toUpperCase()})/");
|
||||
final path3 =
|
||||
Directory("${path4.path}${manga.name!.replaceAll(regExp, '_')}/");
|
||||
|
||||
|
|
@ -79,6 +82,9 @@ Future<List<String>> downloadChapter(
|
|||
if (!(await path2.exists())) {
|
||||
path2.create();
|
||||
}
|
||||
if (!(await path5.exists())) {
|
||||
path5.create();
|
||||
}
|
||||
if (!(await path4.exists())) {
|
||||
path4.create();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'download_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$downloadChapterHash() => r'20dc52124bda6a0d1bfeb675e9320917889fc108';
|
||||
String _$downloadChapterHash() => r'c9e99dfc6dac4d501611822490ee73f31270677c';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -118,4 +118,5 @@ class DownloadChapterProvider extends AutoDisposeFutureProvider<List<String>> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -135,4 +135,5 @@ class AutoCropBorderProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -122,4 +122,5 @@ class CurrentIndexProvider
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import 'dart:math';
|
|||
import 'dart:io';
|
||||
import 'package:draggable_menu/draggable_menu.dart';
|
||||
import 'package:extended_image/extended_image.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -165,7 +166,7 @@ class _MangaChapterPageGalleryState
|
|||
|
||||
late Chapter chapter = widget.chapter;
|
||||
|
||||
List<UChapDataPreload> _uChapDataPreload = [];
|
||||
final List<UChapDataPreload> _uChapDataPreload = [];
|
||||
bool animatePageTransitions =
|
||||
isar.settings.getSync(227)!.animatePageTransitions!;
|
||||
Duration? _doubleTapAnimationDuration() {
|
||||
|
|
@ -179,11 +180,10 @@ class _MangaChapterPageGalleryState
|
|||
return const Duration(milliseconds: 200);
|
||||
}
|
||||
|
||||
late int _currentIndex = _readerController.getPageIndex();
|
||||
late int? _currentIndex = _readerController.getPageIndex();
|
||||
|
||||
T? ambiguate<T>(T? value) => value;
|
||||
|
||||
BuildContext? _listViewContext;
|
||||
late ListObserverController _observerController;
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
@override
|
||||
|
|
@ -192,10 +192,6 @@ class _MangaChapterPageGalleryState
|
|||
controller: _scrollController,
|
||||
);
|
||||
|
||||
ambiguate(WidgetsBinding.instance)?.addPostFrameCallback((timeStamp) {
|
||||
ListViewOnceObserveNotification().dispatch(_listViewContext);
|
||||
});
|
||||
|
||||
_doubleClickAnimationController = AnimationController(
|
||||
duration: _doubleTapAnimationDuration(), vsync: this);
|
||||
|
||||
|
|
@ -245,78 +241,11 @@ class _MangaChapterPageGalleryState
|
|||
}
|
||||
if (mounted) {
|
||||
uChapDataPreloadL.addAll(uChapDataPreloadP);
|
||||
setState(() {
|
||||
_uChapDataPreload = uChapDataPreloadL;
|
||||
_chapterUrlModel = chapterData;
|
||||
_readerController = ReaderController(chapter: chap);
|
||||
_readerController = ReaderController(
|
||||
chapter: _uChapDataPreload[_currentIndex].chapter!);
|
||||
chapter = chap;
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
_preloadPrevChapter(GetChapterUrlModel chapterData, Chapter chap) async {
|
||||
// try {
|
||||
// int length = 0;
|
||||
// bool isExist = false;
|
||||
// List<UChapDataPreload> preChap = [];
|
||||
// for (var ee in _uChapDataPreload) {
|
||||
// if (chapterData.uChapDataPreload.first.chapter!.url ==
|
||||
// ee.chapter!.url) {
|
||||
// isExist = true;
|
||||
// }
|
||||
// }
|
||||
// if (!isExist) {
|
||||
// for (var aa in chapterData.uChapDataPreload) {
|
||||
// preChap.add(aa);
|
||||
// }
|
||||
// }
|
||||
// if (preChap.isNotEmpty) {
|
||||
// if (_uChapDataPreload.isNotEmpty) {
|
||||
// length = preChap.length;
|
||||
|
||||
// for (var i = 0; i < _uChapDataPreload.length; i++) {
|
||||
// int index = i + length;
|
||||
// final dataPreload = _uChapDataPreload[i];
|
||||
// preChap.add(UChapDataPreload(
|
||||
// dataPreload.chapter,
|
||||
// dataPreload.path,
|
||||
// dataPreload.url,
|
||||
// dataPreload.isLocale,
|
||||
// dataPreload.archiveImage,
|
||||
// dataPreload.index,
|
||||
// dataPreload.hasNextPrePage,
|
||||
// dataPreload.hasPrevPrePage,
|
||||
// dataPreload.chapterUrlModel,
|
||||
// index));
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (mounted) {
|
||||
// _uChapDataPreload.clear();
|
||||
// _uChapDataPreload.addAll(preChap);
|
||||
// setState(() {
|
||||
// _readerController = ReaderController(chapter: chap);
|
||||
// _currentIndex =
|
||||
// _uChapDataPreload[_currentIndex + 1].pageIndex! + length;
|
||||
// _chapterUrlModel = chapterData;
|
||||
// chapter = chap;
|
||||
// });
|
||||
// try {
|
||||
// if (_isVerticalContinous()) {
|
||||
// _observerController.jumpTo(index: _currentIndex);
|
||||
// } else {
|
||||
// _extendedController.jumpToPage(_currentIndex);
|
||||
// }
|
||||
// } catch (_) {}
|
||||
// }
|
||||
// }
|
||||
// } catch (_) {}
|
||||
}
|
||||
|
||||
late bool _isBookmarked = _readerController.getChapterBookmarked();
|
||||
_initCurrentIndex() async {
|
||||
_uChapDataPreload.addAll(_chapterUrlModel.uChapDataPreload);
|
||||
|
|
@ -325,43 +254,25 @@ class _MangaChapterPageGalleryState
|
|||
_selectedValue = _readerController.getReaderMode();
|
||||
_setReaderMode(_selectedValue!, true);
|
||||
ref.read(currentIndexProvider(chapter).notifier).setCurrentIndex(
|
||||
_uChapDataPreload[_currentIndex].index!,
|
||||
_uChapDataPreload[_currentIndex ?? 0].index!,
|
||||
);
|
||||
}
|
||||
|
||||
void _onPageChanged(int index) {
|
||||
_readerController =
|
||||
ReaderController(chapter: _uChapDataPreload[index].chapter!);
|
||||
|
||||
_chapterUrlModel = _uChapDataPreload[index].chapterUrlModel!;
|
||||
|
||||
_currentIndex = index;
|
||||
_isBookmarked = _readerController.getChapterBookmarked();
|
||||
_readerController.setMangaHistoryUpdate();
|
||||
_readerController.setPageIndex(_uChapDataPreload[_currentIndex].index!);
|
||||
if (_chapterId != _uChapDataPreload[_currentIndex ?? 0].chapter!.id) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_chapterUrlModel =
|
||||
_uChapDataPreload[_currentIndex ?? 0].chapterUrlModel!;
|
||||
_chapterId = _uChapDataPreload[_currentIndex ?? 0].chapter!.id;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ref.read(currentIndexProvider(chapter).notifier).setCurrentIndex(
|
||||
_uChapDataPreload[index].index!,
|
||||
);
|
||||
if (_uChapDataPreload[index].index! == 0) {
|
||||
try {
|
||||
bool hasPrevChapter = _readerController.getChapterIndex() + 1 !=
|
||||
_readerController.getChaptersLength();
|
||||
|
||||
final chapter =
|
||||
hasPrevChapter ? _readerController.getPrevChapter() : null;
|
||||
|
||||
if (chapter != null) {
|
||||
ref
|
||||
.watch(getChapterUrlProvider(
|
||||
chapter: chapter,
|
||||
).future)
|
||||
.then((value) async {
|
||||
await _preloadPrevChapter(value, chapter);
|
||||
});
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
if (_uChapDataPreload[index].index! ==
|
||||
_readerController.getPageLength([]) - 1) {
|
||||
try {
|
||||
|
|
@ -379,7 +290,6 @@ class _MangaChapterPageGalleryState
|
|||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
final double _imageDetailY = 0;
|
||||
|
|
@ -492,7 +402,7 @@ class _MangaChapterPageGalleryState
|
|||
}
|
||||
|
||||
late final _extendedController = ExtendedPageController(
|
||||
initialPage: _currentIndex,
|
||||
initialPage: _currentIndex ?? 0,
|
||||
shouldIgnorePointerWhenScrolling: false,
|
||||
);
|
||||
|
||||
|
|
@ -535,11 +445,6 @@ class _MangaChapterPageGalleryState
|
|||
|
||||
late bool _showPagesNumber = _readerController.getShowPageNumber();
|
||||
_setReaderMode(ReaderMode value, bool isInit) async {
|
||||
final indexPos = _posIndex == null
|
||||
? _currentIndex
|
||||
: isInit
|
||||
? _currentIndex
|
||||
: _posIndex;
|
||||
_readerController.setReaderMode(value);
|
||||
if (value == ReaderMode.vertical) {
|
||||
if (mounted) {
|
||||
|
|
@ -550,7 +455,7 @@ class _MangaChapterPageGalleryState
|
|||
});
|
||||
await Future.delayed(const Duration(milliseconds: 30));
|
||||
|
||||
_extendedController.jumpToPage(indexPos!);
|
||||
_extendedController.jumpToPage(_currentIndex!);
|
||||
}
|
||||
} else if (value == ReaderMode.ltr || value == ReaderMode.rtl) {
|
||||
if (mounted) {
|
||||
|
|
@ -565,7 +470,7 @@ class _MangaChapterPageGalleryState
|
|||
});
|
||||
await Future.delayed(const Duration(milliseconds: 30));
|
||||
|
||||
_extendedController.jumpToPage(indexPos!);
|
||||
_extendedController.jumpToPage(_currentIndex!);
|
||||
}
|
||||
} else {
|
||||
if (mounted) {
|
||||
|
|
@ -575,7 +480,7 @@ class _MangaChapterPageGalleryState
|
|||
});
|
||||
await Future.delayed(const Duration(milliseconds: 30));
|
||||
_observerController.animateTo(
|
||||
index: indexPos!,
|
||||
index: _currentIndex!,
|
||||
duration: const Duration(milliseconds: 1),
|
||||
curve: Curves.ease);
|
||||
}
|
||||
|
|
@ -993,9 +898,9 @@ class _MangaChapterPageGalleryState
|
|||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
if (_isReversHorizontal) {
|
||||
_onBtnTapped(_currentIndex + 1, false);
|
||||
_onBtnTapped(_currentIndex! + 1, false);
|
||||
} else {
|
||||
_onBtnTapped(_currentIndex - 1, true);
|
||||
_onBtnTapped(_currentIndex! - 1, true);
|
||||
}
|
||||
},
|
||||
onDoubleTapDown: _isVerticalContinous()
|
||||
|
|
@ -1031,9 +936,9 @@ class _MangaChapterPageGalleryState
|
|||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
if (_isReversHorizontal) {
|
||||
_onBtnTapped(_currentIndex - 1, true);
|
||||
_onBtnTapped(_currentIndex! - 1, true);
|
||||
} else {
|
||||
_onBtnTapped(_currentIndex + 1, false);
|
||||
_onBtnTapped(_currentIndex! + 1, false);
|
||||
}
|
||||
},
|
||||
onDoubleTapDown: _isVerticalContinous()
|
||||
|
|
@ -1061,7 +966,7 @@ class _MangaChapterPageGalleryState
|
|||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
_onBtnTapped(_currentIndex - 1, true);
|
||||
_onBtnTapped(_currentIndex! - 1, true);
|
||||
},
|
||||
onDoubleTapDown: _isVerticalContinous()
|
||||
? (TapDownDetails details) {
|
||||
|
|
@ -1081,7 +986,7 @@ class _MangaChapterPageGalleryState
|
|||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
_onBtnTapped(_currentIndex + 1, false);
|
||||
_onBtnTapped(_currentIndex! + 1, false);
|
||||
},
|
||||
onDoubleTapDown: _isVerticalContinous()
|
||||
? (TapDownDetails details) {
|
||||
|
|
@ -1103,7 +1008,7 @@ class _MangaChapterPageGalleryState
|
|||
_selectedValue == ReaderMode.webtoon;
|
||||
}
|
||||
|
||||
int? _posIndex;
|
||||
late int? _chapterId = widget.chapter.id;
|
||||
final StreamController<double> _rebuildDetail =
|
||||
StreamController<double>.broadcast();
|
||||
final Map<int, ImageDetailInfo> detailKeys = <int, ImageDetailInfo>{};
|
||||
|
|
@ -1126,320 +1031,334 @@ class _MangaChapterPageGalleryState
|
|||
|
||||
return false;
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
_isVerticalContinous()
|
||||
? PhotoViewGallery.builder(
|
||||
itemCount: 1,
|
||||
builder: (_, __) => PhotoViewGalleryPageOptions.customChild(
|
||||
controller: _photoViewController,
|
||||
scaleStateController: _photoViewScaleStateController,
|
||||
basePosition: _scalePosition,
|
||||
onScaleEnd: _onScaleEnd,
|
||||
child: ListViewObserver(
|
||||
controller: _observerController,
|
||||
sliverListContexts: () {
|
||||
return [
|
||||
if (_listViewContext != null) _listViewContext!
|
||||
];
|
||||
},
|
||||
onObserveAll: (resultMap) {
|
||||
final model = resultMap[_listViewContext];
|
||||
if (model == null) return;
|
||||
_posIndex = model.firstChild?.index ?? 0;
|
||||
setState(() {
|
||||
_readerController = ReaderController(
|
||||
chapter:
|
||||
_uChapDataPreload[_posIndex ?? 0].chapter!);
|
||||
child: NotificationListener<UserScrollNotification>(
|
||||
onNotification: (notification) {
|
||||
if (notification.direction == ScrollDirection.idle) {
|
||||
_readerController.setMangaHistoryUpdate();
|
||||
_readerController
|
||||
.setPageIndex(_uChapDataPreload[_currentIndex ?? 0].index!);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
child: StreamBuilder(
|
||||
stream:
|
||||
isar.chapters.watchObject(_chapterId!, fireImmediately: true),
|
||||
builder: (context, snapshot) {
|
||||
final chapterData = snapshot.hasData && snapshot.data != null
|
||||
? snapshot.data
|
||||
: chapter;
|
||||
if (chapterData != null) {
|
||||
_readerController = ReaderController(chapter: chapterData);
|
||||
_isBookmarked = chapterData.isBookmarked!;
|
||||
}
|
||||
return Stack(
|
||||
children: [
|
||||
_isVerticalContinous()
|
||||
? PhotoViewGallery.builder(
|
||||
itemCount: 1,
|
||||
builder: (_, __) =>
|
||||
PhotoViewGalleryPageOptions.customChild(
|
||||
controller: _photoViewController,
|
||||
scaleStateController:
|
||||
_photoViewScaleStateController,
|
||||
basePosition: _scalePosition,
|
||||
onScaleEnd: _onScaleEnd,
|
||||
child: ListViewObserver(
|
||||
controller: _observerController,
|
||||
onObserve: (result) {
|
||||
_currentIndex = result.firstChild?.index ?? 0;
|
||||
|
||||
_chapterUrlModel = _uChapDataPreload[_posIndex ?? 0]
|
||||
.chapterUrlModel!;
|
||||
|
||||
_currentIndex = _posIndex!;
|
||||
});
|
||||
_isBookmarked =
|
||||
_readerController.getChapterBookmarked();
|
||||
_readerController.setMangaHistoryUpdate();
|
||||
_readerController.setPageIndex(
|
||||
_uChapDataPreload[_posIndex ?? 0].index!);
|
||||
|
||||
ref
|
||||
.read(currentIndexProvider(chapter).notifier)
|
||||
.setCurrentIndex(
|
||||
_uChapDataPreload[_posIndex ?? 0].index!,
|
||||
);
|
||||
},
|
||||
child: ListView.separated(
|
||||
cacheExtent: 15 * mediaHeight(context, 1),
|
||||
itemCount: _uChapDataPreload.length,
|
||||
controller: _scrollController,
|
||||
itemBuilder: (context, index) {
|
||||
if (_listViewContext != context) {
|
||||
_listViewContext = context;
|
||||
}
|
||||
|
||||
_scrollController.addListener(() {
|
||||
if (_scrollController.position.pixels ==
|
||||
_scrollController.position.minScrollExtent) {
|
||||
try {
|
||||
bool hasPrevChapter =
|
||||
_readerController.getChapterIndex() + 1 !=
|
||||
_readerController.getChaptersLength();
|
||||
|
||||
final chapter = hasPrevChapter
|
||||
? _readerController.getPrevChapter()
|
||||
: null;
|
||||
|
||||
if (chapter != null) {
|
||||
ref
|
||||
.watch(getChapterUrlProvider(
|
||||
chapter: chapter,
|
||||
).future)
|
||||
.then((value) async {
|
||||
await _preloadPrevChapter(value, chapter);
|
||||
});
|
||||
if (_chapterId !=
|
||||
_uChapDataPreload[_currentIndex ?? 0]
|
||||
.chapter!
|
||||
.id) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_chapterUrlModel =
|
||||
_uChapDataPreload[_currentIndex ?? 0]
|
||||
.chapterUrlModel!;
|
||||
_chapterId =
|
||||
_uChapDataPreload[_currentIndex ?? 0]
|
||||
.chapter!
|
||||
.id;
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
if (_scrollController.position.pixels ==
|
||||
_scrollController.position.maxScrollExtent) {
|
||||
try {
|
||||
bool hasNextChapter =
|
||||
_readerController.getChapterIndex() != 0;
|
||||
final chapter = hasNextChapter
|
||||
? _readerController.getNextChapter()
|
||||
: null;
|
||||
if (chapter != null) {
|
||||
ref
|
||||
.watch(getChapterUrlProvider(
|
||||
chapter: chapter,
|
||||
).future)
|
||||
.then((value) {
|
||||
_preloadNextChapter(value, chapter);
|
||||
ref
|
||||
.read(
|
||||
currentIndexProvider(chapter).notifier)
|
||||
.setCurrentIndex(
|
||||
_uChapDataPreload[_currentIndex ?? 0]
|
||||
.index!,
|
||||
);
|
||||
},
|
||||
child: ListView.separated(
|
||||
cacheExtent: 15 * mediaHeight(context, 1),
|
||||
itemCount: _uChapDataPreload.length,
|
||||
controller: _scrollController,
|
||||
itemBuilder: (context, index) {
|
||||
_scrollController.addListener(() {
|
||||
if (_scrollController.position.pixels ==
|
||||
_scrollController
|
||||
.position.maxScrollExtent) {
|
||||
try {
|
||||
bool hasNextChapter = _readerController
|
||||
.getChapterIndex() !=
|
||||
0;
|
||||
final chapter = hasNextChapter
|
||||
? _readerController.getNextChapter()
|
||||
: null;
|
||||
if (chapter != null) {
|
||||
ref
|
||||
.watch(getChapterUrlProvider(
|
||||
chapter: chapter,
|
||||
).future)
|
||||
.then((value) {
|
||||
_preloadNextChapter(value, chapter);
|
||||
});
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
});
|
||||
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onDoubleTapDown: (TapDownDetails details) {
|
||||
_toggleScale(details.globalPosition);
|
||||
},
|
||||
onDoubleTap: () {},
|
||||
child: ImageViewVertical(
|
||||
archiveImage: _cropImagesList.isNotEmpty &&
|
||||
cropBorders == true
|
||||
? _cropImagesList[index]
|
||||
: _uChapDataPreload[index].archiveImage,
|
||||
titleManga: _readerController.getMangaName(),
|
||||
source: _readerController.getSourceName(),
|
||||
index: _uChapDataPreload[index].index!,
|
||||
url: _uChapDataPreload[index].url!,
|
||||
path: _uChapDataPreload[index].path!,
|
||||
chapter: _readerController.getChapterTitle(),
|
||||
length: _readerController
|
||||
.getPageLength(_chapterUrlModel.pageUrls),
|
||||
isLocale: _cropImagesList.isNotEmpty &&
|
||||
cropBorders == true
|
||||
? true
|
||||
: _uChapDataPreload[index].isLocale!,
|
||||
lang: _uChapDataPreload[index]
|
||||
.chapter!
|
||||
.manga
|
||||
.value!
|
||||
.lang!,
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (_, __) => Divider(
|
||||
color: Colors.black,
|
||||
height:
|
||||
_selectedValue == ReaderMode.webtoon ? 0 : 6),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: Material(
|
||||
color: Colors.black,
|
||||
shadowColor: Colors.black,
|
||||
child: ExtendedImageGesturePageView.builder(
|
||||
controller: _extendedController,
|
||||
scrollDirection: _scrollDirection,
|
||||
reverse: _isReversHorizontal,
|
||||
physics: const ClampingScrollPhysics(),
|
||||
preloadPagesCount: _isZoom ? 0 : 6,
|
||||
canScrollPage: (GestureDetails? gestureDetails) {
|
||||
return gestureDetails != null
|
||||
? !(gestureDetails.totalScale! > 1.0)
|
||||
: true;
|
||||
},
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ImageViewCenter(
|
||||
archiveImage:
|
||||
_cropImagesList.isNotEmpty && cropBorders == true
|
||||
? _cropImagesList[index]
|
||||
: _uChapDataPreload[index].archiveImage,
|
||||
titleManga: _readerController.getMangaName(),
|
||||
source: _readerController.getSourceName(),
|
||||
index: _uChapDataPreload[index].index!,
|
||||
url: _uChapDataPreload[index].url!,
|
||||
path: _uChapDataPreload[index].path!,
|
||||
chapter: _readerController.getChapterTitle(),
|
||||
length: _readerController
|
||||
.getPageLength(_chapterUrlModel.pageUrls),
|
||||
loadStateChanged: (ExtendedImageState state) {
|
||||
if (state.extendedImageLoadState ==
|
||||
LoadState.loading) {
|
||||
final ImageChunkEvent? loadingProgress =
|
||||
state.loadingProgress;
|
||||
final double progress =
|
||||
loadingProgress?.expectedTotalBytes != null
|
||||
? loadingProgress!.cumulativeBytesLoaded /
|
||||
loadingProgress.expectedTotalBytes!
|
||||
: 0;
|
||||
return Container(
|
||||
color: Colors.black,
|
||||
height: mediaHeight(context, 0.8),
|
||||
child: CircularProgressIndicatorAnimateRotate(
|
||||
progress: progress),
|
||||
);
|
||||
}
|
||||
if (state.extendedImageLoadState ==
|
||||
LoadState.completed) {
|
||||
return StreamBuilder<double>(
|
||||
builder: (BuildContext context,
|
||||
AsyncSnapshot<double> data) {
|
||||
return ExtendedImageGesture(
|
||||
state,
|
||||
canScaleImage: (_) => _imageDetailY == 0,
|
||||
imageBuilder: (Widget image) {
|
||||
return Stack(
|
||||
children: <Widget>[
|
||||
Positioned.fill(
|
||||
top: _imageDetailY,
|
||||
bottom: -_imageDetailY,
|
||||
child: image,
|
||||
),
|
||||
],
|
||||
);
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onDoubleTapDown: (TapDownDetails details) {
|
||||
_toggleScale(details.globalPosition);
|
||||
},
|
||||
onDoubleTap: () {},
|
||||
child: ImageViewVertical(
|
||||
archiveImage:
|
||||
_cropImagesList.isNotEmpty &&
|
||||
cropBorders == true
|
||||
? _cropImagesList[index]
|
||||
: _uChapDataPreload[index]
|
||||
.archiveImage,
|
||||
titleManga:
|
||||
_readerController.getMangaName(),
|
||||
source: _readerController.getSourceName(),
|
||||
index: _uChapDataPreload[index].index!,
|
||||
url: _uChapDataPreload[index].url!,
|
||||
path: _uChapDataPreload[index].path!,
|
||||
chapter:
|
||||
_readerController.getChapterTitle(),
|
||||
length: _readerController.getPageLength(
|
||||
_chapterUrlModel.pageUrls),
|
||||
isLocale: _cropImagesList.isNotEmpty &&
|
||||
cropBorders == true
|
||||
? true
|
||||
: _uChapDataPreload[index].isLocale!,
|
||||
lang: _uChapDataPreload[index]
|
||||
.chapter!
|
||||
.manga
|
||||
.value!
|
||||
.lang!,
|
||||
),
|
||||
);
|
||||
},
|
||||
initialData: _imageDetailY,
|
||||
stream: _rebuildDetail.stream,
|
||||
);
|
||||
}
|
||||
if (state.extendedImageLoadState ==
|
||||
LoadState.failed) {
|
||||
return Container(
|
||||
color: Colors.black,
|
||||
height: mediaHeight(context, 0.8),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
state.reLoadImage();
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.replay_outlined,
|
||||
size: 30,
|
||||
)),
|
||||
],
|
||||
));
|
||||
}
|
||||
return Container();
|
||||
},
|
||||
initGestureConfigHandler: (ExtendedImageState state) {
|
||||
double? initialScale = 1.0;
|
||||
final size = MediaQuery.of(context).size;
|
||||
if (state.extendedImageInfo != null) {
|
||||
initialScale = initScale(
|
||||
size: size,
|
||||
initialScale: initialScale,
|
||||
imageSize: Size(
|
||||
state.extendedImageInfo!.image.width
|
||||
.toDouble(),
|
||||
state.extendedImageInfo!.image.height
|
||||
.toDouble()));
|
||||
}
|
||||
return GestureConfig(
|
||||
inertialSpeed: 200,
|
||||
inPageView: true,
|
||||
initialScale: initialScale!,
|
||||
maxScale: 8,
|
||||
animationMaxScale: 8,
|
||||
initialAlignment: InitialAlignment.center,
|
||||
cacheGesture: true,
|
||||
hitTestBehavior: HitTestBehavior.translucent,
|
||||
);
|
||||
},
|
||||
onDoubleTap: (ExtendedImageGestureState state) {
|
||||
final Offset? pointerDownPosition =
|
||||
state.pointerDownPosition;
|
||||
final double? begin =
|
||||
state.gestureDetails!.totalScale;
|
||||
double end;
|
||||
separatorBuilder: (_, __) => Divider(
|
||||
color: Colors.black,
|
||||
height: _selectedValue == ReaderMode.webtoon
|
||||
? 0
|
||||
: 6),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: Material(
|
||||
color: Colors.black,
|
||||
shadowColor: Colors.black,
|
||||
child: ExtendedImageGesturePageView.builder(
|
||||
controller: _extendedController,
|
||||
scrollDirection: _scrollDirection,
|
||||
reverse: _isReversHorizontal,
|
||||
physics: const ClampingScrollPhysics(),
|
||||
preloadPagesCount: _isZoom ? 0 : 6,
|
||||
canScrollPage: (GestureDetails? gestureDetails) {
|
||||
return gestureDetails != null
|
||||
? !(gestureDetails.totalScale! > 1.0)
|
||||
: true;
|
||||
},
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ImageViewCenter(
|
||||
archiveImage: _cropImagesList.isNotEmpty &&
|
||||
cropBorders == true
|
||||
? _cropImagesList[index]
|
||||
: _uChapDataPreload[index].archiveImage,
|
||||
titleManga: _readerController.getMangaName(),
|
||||
source: _readerController.getSourceName(),
|
||||
index: _uChapDataPreload[index].index!,
|
||||
url: _uChapDataPreload[index].url!,
|
||||
path: _uChapDataPreload[index].path!,
|
||||
chapter: _readerController.getChapterTitle(),
|
||||
length: _readerController
|
||||
.getPageLength(_chapterUrlModel.pageUrls),
|
||||
loadStateChanged: (ExtendedImageState state) {
|
||||
if (state.extendedImageLoadState ==
|
||||
LoadState.loading) {
|
||||
final ImageChunkEvent? loadingProgress =
|
||||
state.loadingProgress;
|
||||
final double progress =
|
||||
loadingProgress?.expectedTotalBytes !=
|
||||
null
|
||||
? loadingProgress!
|
||||
.cumulativeBytesLoaded /
|
||||
loadingProgress
|
||||
.expectedTotalBytes!
|
||||
: 0;
|
||||
return Container(
|
||||
color: Colors.black,
|
||||
height: mediaHeight(context, 0.8),
|
||||
child:
|
||||
CircularProgressIndicatorAnimateRotate(
|
||||
progress: progress),
|
||||
);
|
||||
}
|
||||
if (state.extendedImageLoadState ==
|
||||
LoadState.completed) {
|
||||
return StreamBuilder<double>(
|
||||
builder: (BuildContext context,
|
||||
AsyncSnapshot<double> data) {
|
||||
return ExtendedImageGesture(
|
||||
state,
|
||||
canScaleImage: (_) =>
|
||||
_imageDetailY == 0,
|
||||
imageBuilder: (Widget image) {
|
||||
return Stack(
|
||||
children: <Widget>[
|
||||
Positioned.fill(
|
||||
top: _imageDetailY,
|
||||
bottom: -_imageDetailY,
|
||||
child: image,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
initialData: _imageDetailY,
|
||||
stream: _rebuildDetail.stream,
|
||||
);
|
||||
}
|
||||
if (state.extendedImageLoadState ==
|
||||
LoadState.failed) {
|
||||
return Container(
|
||||
color: Colors.black,
|
||||
height: mediaHeight(context, 0.8),
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
state.reLoadImage();
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.replay_outlined,
|
||||
size: 30,
|
||||
)),
|
||||
],
|
||||
));
|
||||
}
|
||||
return Container();
|
||||
},
|
||||
initGestureConfigHandler:
|
||||
(ExtendedImageState state) {
|
||||
double? initialScale = 1.0;
|
||||
final size = MediaQuery.of(context).size;
|
||||
if (state.extendedImageInfo != null) {
|
||||
initialScale = initScale(
|
||||
size: size,
|
||||
initialScale: initialScale,
|
||||
imageSize: Size(
|
||||
state.extendedImageInfo!.image
|
||||
.width
|
||||
.toDouble(),
|
||||
state.extendedImageInfo!.image
|
||||
.height
|
||||
.toDouble()));
|
||||
}
|
||||
return GestureConfig(
|
||||
inertialSpeed: 200,
|
||||
inPageView: true,
|
||||
initialScale: initialScale!,
|
||||
maxScale: 8,
|
||||
animationMaxScale: 8,
|
||||
initialAlignment: InitialAlignment.center,
|
||||
cacheGesture: true,
|
||||
hitTestBehavior:
|
||||
HitTestBehavior.translucent,
|
||||
);
|
||||
},
|
||||
onDoubleTap:
|
||||
(ExtendedImageGestureState state) {
|
||||
final Offset? pointerDownPosition =
|
||||
state.pointerDownPosition;
|
||||
final double? begin =
|
||||
state.gestureDetails!.totalScale;
|
||||
double end;
|
||||
|
||||
//remove old
|
||||
_doubleClickAnimation
|
||||
?.removeListener(_doubleClickAnimationListener);
|
||||
//remove old
|
||||
_doubleClickAnimation?.removeListener(
|
||||
_doubleClickAnimationListener);
|
||||
|
||||
//stop pre
|
||||
_doubleClickAnimationController.stop();
|
||||
//stop pre
|
||||
_doubleClickAnimationController.stop();
|
||||
|
||||
//reset to use
|
||||
_doubleClickAnimationController.reset();
|
||||
//reset to use
|
||||
_doubleClickAnimationController.reset();
|
||||
|
||||
if (begin == doubleTapScales[0]) {
|
||||
setState(() {
|
||||
_isZoom = true;
|
||||
});
|
||||
end = doubleTapScales[1];
|
||||
} else {
|
||||
setState(() {
|
||||
_isZoom = false;
|
||||
});
|
||||
end = doubleTapScales[0];
|
||||
}
|
||||
if (begin == doubleTapScales[0]) {
|
||||
setState(() {
|
||||
_isZoom = true;
|
||||
});
|
||||
end = doubleTapScales[1];
|
||||
} else {
|
||||
setState(() {
|
||||
_isZoom = false;
|
||||
});
|
||||
end = doubleTapScales[0];
|
||||
}
|
||||
|
||||
_doubleClickAnimationListener = () {
|
||||
state.handleDoubleTap(
|
||||
scale: _doubleClickAnimation!.value,
|
||||
doubleTapPosition: pointerDownPosition);
|
||||
};
|
||||
_doubleClickAnimationListener = () {
|
||||
state.handleDoubleTap(
|
||||
scale: _doubleClickAnimation!.value,
|
||||
doubleTapPosition:
|
||||
pointerDownPosition);
|
||||
};
|
||||
|
||||
_doubleClickAnimation = Tween(
|
||||
begin: begin, end: end)
|
||||
.animate(CurvedAnimation(
|
||||
curve: Curves.ease,
|
||||
parent: _doubleClickAnimationController));
|
||||
_doubleClickAnimation = Tween(
|
||||
begin: begin, end: end)
|
||||
.animate(CurvedAnimation(
|
||||
curve: Curves.ease,
|
||||
parent:
|
||||
_doubleClickAnimationController));
|
||||
|
||||
_doubleClickAnimation!
|
||||
.addListener(_doubleClickAnimationListener);
|
||||
_doubleClickAnimation!.addListener(
|
||||
_doubleClickAnimationListener);
|
||||
|
||||
_doubleClickAnimationController.forward();
|
||||
},
|
||||
isLocale:
|
||||
_cropImagesList.isNotEmpty && cropBorders == true
|
||||
? true
|
||||
: _uChapDataPreload[index].isLocale!,
|
||||
lang: _uChapDataPreload[index]
|
||||
.chapter!
|
||||
.manga
|
||||
.value!
|
||||
.lang!,
|
||||
);
|
||||
},
|
||||
itemCount: _uChapDataPreload.length,
|
||||
onPageChanged: _onPageChanged)),
|
||||
_gestureRightLeft(),
|
||||
_gestureTopBottom(),
|
||||
_showMore(),
|
||||
_showPage(),
|
||||
],
|
||||
_doubleClickAnimationController.forward();
|
||||
},
|
||||
isLocale: _cropImagesList.isNotEmpty &&
|
||||
cropBorders == true
|
||||
? true
|
||||
: _uChapDataPreload[index].isLocale!,
|
||||
lang: _uChapDataPreload[index]
|
||||
.chapter!
|
||||
.manga
|
||||
.value!
|
||||
.lang!,
|
||||
);
|
||||
},
|
||||
itemCount: _uChapDataPreload.length,
|
||||
onPageChanged: _onPageChanged)),
|
||||
_gestureRightLeft(),
|
||||
_gestureTopBottom(),
|
||||
_showMore(),
|
||||
_showPage(),
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,13 +56,14 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
children: [
|
||||
SizedBox(
|
||||
height: 150,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/icon.png",
|
||||
color: Theme.of(context).brightness == Brightness.light
|
||||
? Colors.black
|
||||
: Colors.white,
|
||||
))),
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/icon.png",
|
||||
// color: Theme.of(context).brightness == Brightness.light
|
||||
// ? Colors.black
|
||||
// : Colors.white,
|
||||
// ))
|
||||
),
|
||||
Flexible(
|
||||
flex: 3,
|
||||
child: Column(
|
||||
|
|
|
|||
|
|
@ -112,4 +112,5 @@ class GetMangaCategorieStreamProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -16,13 +16,14 @@ class MoreScreen extends StatelessWidget {
|
|||
children: [
|
||||
SizedBox(
|
||||
height: 200,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/icon.png",
|
||||
color: Theme.of(context).brightness == Brightness.light
|
||||
? Colors.black
|
||||
: Colors.white,
|
||||
))),
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/icon.png",
|
||||
// color: Theme.of(context).brightness == Brightness.light
|
||||
// ? Colors.black
|
||||
// : Colors.white,
|
||||
// ))
|
||||
),
|
||||
const Divider(),
|
||||
// ListTile(
|
||||
// onTap: () {},
|
||||
|
|
|
|||
|
|
@ -23,4 +23,5 @@ final incognitoModeStateProvider =
|
|||
);
|
||||
|
||||
typedef _$IncognitoModeState = AutoDisposeNotifier<bool>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -22,4 +22,5 @@ final blendLevelStateProvider =
|
|||
);
|
||||
|
||||
typedef _$BlendLevelState = AutoDisposeNotifier<double>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -39,4 +39,5 @@ final relativeTimesTampsStateProvider =
|
|||
);
|
||||
|
||||
typedef _$RelativeTimesTampsState = AutoDisposeNotifier<int>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -23,4 +23,5 @@ final flexSchemeColorStateProvider =
|
|||
);
|
||||
|
||||
typedef _$FlexSchemeColorState = AutoDisposeNotifier<FlexSchemeColor>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -23,4 +23,5 @@ final pureBlackDarkModeStateProvider =
|
|||
);
|
||||
|
||||
typedef _$PureBlackDarkModeState = AutoDisposeNotifier<bool>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -22,4 +22,5 @@ final themeModeStateProvider =
|
|||
);
|
||||
|
||||
typedef _$ThemeModeState = AutoDisposeNotifier<bool>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -39,4 +39,5 @@ final showNSFWStateProvider =
|
|||
);
|
||||
|
||||
typedef _$ShowNSFWState = AutoDisposeNotifier<bool>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -56,4 +56,5 @@ final downloadLocationStateProvider = AutoDisposeNotifierProvider<
|
|||
);
|
||||
|
||||
typedef _$DownloadLocationState = AutoDisposeNotifier<(String, String)>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -73,4 +73,5 @@ final cropBordersStateProvider =
|
|||
);
|
||||
|
||||
typedef _$CropBordersState = AutoDisposeNotifier<bool>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -121,4 +121,5 @@ class TracksProvider
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -22,4 +22,5 @@ final l10nLocaleStateProvider =
|
|||
);
|
||||
|
||||
typedef _$L10nLocaleState = AutoDisposeNotifier<Locale>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -65,16 +65,18 @@ class StorageProvider {
|
|||
String scanlator = chapter.scanlator!.isNotEmpty
|
||||
? "${chapter.scanlator!.replaceAll(_regExpChar, '_')}_"
|
||||
: "";
|
||||
final isManga = chapter.manga.value!.isManga!;
|
||||
final dir = await getDirectory();
|
||||
return Directory(
|
||||
"${dir!.path}/downloads/${manga.source} (${manga.lang!.toUpperCase()})/${manga.name!.replaceAll(_regExpChar, '_')}/$scanlator${chapter.name!.replaceAll(_regExpChar, '_')}/");
|
||||
"${dir!.path}/downloads/${isManga ? "Manga" : "Anime"}/${manga.source} (${manga.lang!.toUpperCase()})/${manga.name!.replaceAll(_regExpChar, '_')}/$scanlator${chapter.name!.replaceAll(_regExpChar, '_')}/");
|
||||
}
|
||||
|
||||
Future<Directory?> getMangaMainDirectory(Chapter chapter) async {
|
||||
final manga = chapter.manga.value!;
|
||||
final isManga = chapter.manga.value!.isManga!;
|
||||
final dir = await getDirectory();
|
||||
return Directory(
|
||||
"${dir!.path}/downloads/${manga.source} (${manga.lang!.toUpperCase()})/${manga.name!.replaceAll(_regExpChar, '_')}/");
|
||||
"${dir!.path}/downloads/${isManga ? "Manga" : "Anime"}/${manga.source} (${manga.lang!.toUpperCase()})/${manga.name!.replaceAll(_regExpChar, '_')}/");
|
||||
}
|
||||
|
||||
Future<Directory?> getDatabaseDirectory() async {
|
||||
|
|
|
|||
|
|
@ -140,4 +140,5 @@ class RouterCurrentLocationStateProvider
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'get_anime_servers.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$getAnimeServersHash() => r'b8bc284660d0034cedff0cfd7d11bc62da9d2915';
|
||||
String _$getAnimeServersHash() => r'cd7f0fc4ee58ec02b015348aed60b1b0f2d1b300';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -109,4 +109,5 @@ class GetAnimeServersProvider extends AutoDisposeFutureProvider<List<Video>> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'get_chapter_url.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$getChapterUrlHash() => r'22f4703bcc2a2f87278a32a884746b8e0b970984';
|
||||
String _$getChapterUrlHash() => r'f013c2b64c901a02da622ca5906df744e53c76be';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -110,4 +110,5 @@ class GetChapterUrlProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ part of 'get_latest_updates_manga.dart';
|
|||
// **************************************************************************
|
||||
|
||||
String _$getLatestUpdatesMangaHash() =>
|
||||
r'acf967d75f5969d51eaa91c8d4efe99796c1e1b2';
|
||||
r'ae5b5ed757a02801592ff62617d1bdea4f763cda';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -122,4 +122,5 @@ class GetLatestUpdatesMangaProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'get_manga_detail.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$getMangaDetailHash() => r'352d9572294f2529443513183a4a7bec3339be1c';
|
||||
String _$getMangaDetailHash() => r'025ccc11f94f9b69bd85d86833bc261f66b74f7f';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -118,4 +118,5 @@ class GetMangaDetailProvider extends AutoDisposeFutureProvider<MangaModel> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'get_popular_manga.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$getPopularMangaHash() => r'34fb3652db050366ced9f57dd1286d62f4b63fe4';
|
||||
String _$getPopularMangaHash() => r'0ba0bb05d0e47aac2f5f1efb742b0b0f8739b1e8';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -119,4 +119,5 @@ class GetPopularMangaProvider
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -117,4 +117,5 @@ class SetCookieProvider extends AutoDisposeFutureProvider<dynamic> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -122,4 +122,5 @@ class CookieStateProvider
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'search_manga.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$searchMangaHash() => r'8c34c40c6eb8f8145d8d12bd3447e5ae4462ed00';
|
||||
String _$searchMangaHash() => r'381a7a67b818f1633df476a4392412b7757030da';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
@ -126,4 +126,5 @@ class SearchMangaProvider extends AutoDisposeFutureProvider<List<MangaModel?>> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -134,4 +134,5 @@ class AnilistProvider
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -135,4 +135,5 @@ class MyAnimeListProvider
|
|||
);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ TrackStatus toStatus(TrackStatus status, bool isManga, int syncId) {
|
|||
|
||||
(String, String) trackInfos(int id) {
|
||||
return switch (id) {
|
||||
1 => ("assets/tracker_mal.webp", "MyAnimeList"),
|
||||
_ => ("assets/tracker_anilist.webp", "Anilist"),
|
||||
1 => ("assets/trackers_icons/tracker_mal.webp", "MyAnimeList"),
|
||||
_ => ("assets/trackers_icons/tracker_anilist.webp", "Anilist"),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,4 +117,5 @@ class HeadersProvider extends AutoDisposeProvider<Map<String, String>> {
|
|||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member
|
||||
|
|
|
|||
|
|
@ -1,68 +1,68 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_16.png",
|
||||
"scale" : "1x"
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
},
|
||||
{
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_32.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_32.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_64.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_128.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_256.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_256.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_512.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_512.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_1024.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
"images": [
|
||||
{
|
||||
"size": "16x16",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_16.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "16x16",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_32.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "32x32",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_32.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "32x32",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_64.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "128x128",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_128.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "128x128",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_256.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "256x256",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_256.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "256x256",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_512.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "512x512",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_512.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "512x512",
|
||||
"idiom": "mac",
|
||||
"filename": "app_icon_1024.png",
|
||||
"scale": "2x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 360 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 749 B |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.6 KiB |
|
|
@ -494,6 +494,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
flutter_launcher_icons:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_launcher_icons
|
||||
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.13.1"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
|
|||
15
pubspec.yaml
|
|
@ -63,7 +63,7 @@ dev_dependencies:
|
|||
sdk: flutter
|
||||
build_runner: ^2.4.5
|
||||
riverpod_generator: ^2.2.3
|
||||
# flutter_launcher_icons: ^0.13.1
|
||||
flutter_launcher_icons: ^0.13.1
|
||||
isar_generator: 3.1.0+1
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
|
|
@ -73,4 +73,15 @@ flutter:
|
|||
|
||||
assets:
|
||||
- assets/
|
||||
|
||||
flutter_launcher_icons:
|
||||
android: "launcher_icon"
|
||||
ios: true
|
||||
remove_alpha_ios: true
|
||||
image_path: "assets/app_icons/icon-red.png"
|
||||
min_sdk_android: 24
|
||||
windows:
|
||||
generate: true
|
||||
image_path: "assets/app_icons/icon-red.png"
|
||||
macos:
|
||||
generate: true
|
||||
image_path: "assets/app_icons/icon-red.png"
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.1 KiB |