clip zoomed image to page size

This commit is contained in:
Thibault Deckers 2020-05-11 11:03:49 +09:00
parent 20acac10ed
commit 868c35773c
2 changed files with 9 additions and 7 deletions

View file

@ -44,12 +44,14 @@ class MultiImagePageState extends State<MultiImagePage> with AutomaticKeepAliveC
onPageChanged: widget.onPageChanged,
itemBuilder: (context, index) {
final entry = entries[index];
return ImageView(
entry: entry,
heroTag: widget.collection.heroTag(entry),
onScaleChanged: widget.onScaleChanged,
onTap: widget.onTap,
videoControllers: widget.videoControllers,
return ClipRect(
child: ImageView(
entry: entry,
heroTag: widget.collection.heroTag(entry),
onScaleChanged: widget.onScaleChanged,
onTap: widget.onTap,
videoControllers: widget.videoControllers,
),
);
},
itemCount: entries.length,

View file

@ -109,7 +109,7 @@ class ImageView extends StatelessWidget {
context,
imageCache.statusForKey(uriImage).keepAlive ? uriImage : thumbnailProvider,
),
loadFailedChild: EmptyContent(
loadFailedChild: const EmptyContent(
icon: AIcons.error,
text: 'Oops!',
alignment: Alignment.center,