clip zoomed image to page size
This commit is contained in:
parent
20acac10ed
commit
868c35773c
2 changed files with 9 additions and 7 deletions
|
@ -44,12 +44,14 @@ class MultiImagePageState extends State<MultiImagePage> with AutomaticKeepAliveC
|
||||||
onPageChanged: widget.onPageChanged,
|
onPageChanged: widget.onPageChanged,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final entry = entries[index];
|
final entry = entries[index];
|
||||||
return ImageView(
|
return ClipRect(
|
||||||
entry: entry,
|
child: ImageView(
|
||||||
heroTag: widget.collection.heroTag(entry),
|
entry: entry,
|
||||||
onScaleChanged: widget.onScaleChanged,
|
heroTag: widget.collection.heroTag(entry),
|
||||||
onTap: widget.onTap,
|
onScaleChanged: widget.onScaleChanged,
|
||||||
videoControllers: widget.videoControllers,
|
onTap: widget.onTap,
|
||||||
|
videoControllers: widget.videoControllers,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: entries.length,
|
itemCount: entries.length,
|
||||||
|
|
|
@ -109,7 +109,7 @@ class ImageView extends StatelessWidget {
|
||||||
context,
|
context,
|
||||||
imageCache.statusForKey(uriImage).keepAlive ? uriImage : thumbnailProvider,
|
imageCache.statusForKey(uriImage).keepAlive ? uriImage : thumbnailProvider,
|
||||||
),
|
),
|
||||||
loadFailedChild: EmptyContent(
|
loadFailedChild: const EmptyContent(
|
||||||
icon: AIcons.error,
|
icon: AIcons.error,
|
||||||
text: 'Oops!',
|
text: 'Oops!',
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|
Loading…
Reference in a new issue