make photo view zoomable
This commit is contained in:
parent
c2ade78754
commit
b9775c05e1
@ -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),
|
||||
),
|
||||
);
|
||||
|
@ -296,6 +296,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.0"
|
||||
photo_view:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: photo_view
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.14.0"
|
||||
pinenacl:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -40,6 +40,7 @@ dependencies:
|
||||
dartssh2: ^2.7.2+3
|
||||
permission_handler: ^10.0.2
|
||||
flutter_secure_storage: ^6.0.0
|
||||
photo_view: ^0.14.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
Loading…
Reference in New Issue
Block a user