diff --git a/lib/full_screen_image_view.dart b/lib/full_screen_image_view.dart index 13a69f2..1cf599b 100644 --- a/lib/full_screen_image_view.dart +++ b/lib/full_screen_image_view.dart @@ -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 { 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), ), ); diff --git a/pubspec.lock b/pubspec.lock index 173023d..faa2924 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: diff --git a/pubspec.yaml b/pubspec.yaml index cf4f8b2..f1344f0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: