Skip to content

Commit

Permalink
Fix gallery scale
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed May 11, 2022
1 parent a2aced2 commit 41b12dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/version.code.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.1
v0.1.2
3 changes: 2 additions & 1 deletion ci/version.info.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
登录和订阅漫画列表
- [x] 修复相册阅读器的缩放模式
- [x] 增加分类
10 changes: 8 additions & 2 deletions lib/screens/comic_reader_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:photo_view/photo_view_gallery.dart';
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';

import '../commons.dart';
import 'components/image_cache_provider.dart';
import 'components/images.dart';

class ComicReaderScreen extends StatefulWidget {
Expand Down Expand Up @@ -1172,15 +1173,20 @@ class _ComicReaderGalleryState extends _ComicReaderState {
itemCount: widget.chapter.pageUrl.length,
allowImplicitScrolling: true,
builder: (BuildContext context, int index) {
return PhotoViewGalleryPageOptions.customChild(
return PhotoViewGalleryPageOptions(
filterQuality: FilterQuality.high,
child: LoadingCacheImage(
imageProvider: ImageCacheProvider(
url: widget.chapter.pageUrl[index],
useful: 'comic_reader',
extendsFieldIntFirst: widget.comic.id,
extendsFieldIntSecond: widget.chapter.chapterId,
extendsFieldIntThird: index,
),
errorBuilder: (c, e, s) => LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return buildError(constraints.maxWidth, constraints.maxHeight);
},
),
);
},
);
Expand Down

0 comments on commit 41b12dc

Please sign in to comment.