pos_pinch_zoom_image 0.2.0

Pinch Zoom Image #

A widget that makes picture pinch zoom, Instagram style!

Example one Example two

Installation #

Add this to your pubspec.yml dependencies:

pos_pinch_zoom_image: "^0.1.0"

How to use #

Add the widget to your app like this (It automatically takes the size of the image you pass to it):

  image: Image.network('https://i.imgur.com/tKg0XEb.jpg'),
  zoomedBackgroundColor: Color.fromRGBO(240, 240, 240, 1.0),
  hideStatusBarWhileZooming: true,
  onZoomStart: () {
    print('Zoom started');
  onZoomEnd: () {
    print('Zoom finished');

The zoomedBackgroundColor is the color that fills the image's space when the use is zooming it and moving it on the screen.

If you want images from internet to be cached for offline use or data saving, you can also use this with the cached_network_image widget:

  image: CachedNetworkImage(
    imageUrl: 'https://i.imgur.com/tKg0XEb.jpg',
  zoomedBackgroundColor: Color.fromRGBO(240, 240, 240, 1.0),
  hideStatusBarWhileZooming: true,


[0.1.0] - Feb 18

  • First release


pinch_zoom_image_example #

Demonstrates how to use the pinch_zoom_image plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  pos_pinch_zoom_image: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:pos_pinch_zoom_image/pos_pinch_zoom_image.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 18, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (cached_network_image).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
cached_network_image ^0.5.0 0.5.1 2.0.0
flutter 0.0.0
Transitive dependencies
async 2.4.0
charcode 1.1.3
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.4
flutter_cache_manager 0.2.0+1 1.1.3
http 0.12.0+4
http_parser 3.1.3
meta 1.1.8
path 1.6.4
path_provider 0.4.1 1.6.0
pedantic 1.9.0
shared_preferences 0.4.3 0.5.6+1
sky_engine 0.0.99
source_span 1.6.0
string_scanner 1.0.5
synchronized 1.5.3+2 2.2.0
term_glyph 1.1.0
typed_data 1.1.6
uuid 1.0.3 2.0.4
vector_math 2.0.8