make photo view zoomable

This commit is contained in:
2022-09-29 11:55:04 +02:00
parent c2ade78754
commit b9775c05e1
3 changed files with 13 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'data_provider/data_provider.dart';
import 'package:photo_view/photo_view.dart';
class FullScreenImageView extends StatefulWidget {
const FullScreenImageView(
@ -47,8 +48,10 @@ class _FullScreenImageViewState extends State<FullScreenImageView> {
itemBuilder: (context, pagePosition) {
return Container(
margin: const EdgeInsets.all(10),
child: Image(
image: widget.provider
child: PhotoView(
backgroundDecoration:
const BoxDecoration(color: Colors.white),
imageProvider: widget.provider
.getImageProvider(widget.items[pagePosition].uri),
),
);