A dart+flutter package for panning and zooming images by touch.
Getting Started #
// You can use any ImageProvider, including NetworkImage and FileImage. new ZoomableImage(new AssetImage('images/squirrel.jpg'), scale: 16.0)
That's all you need. See below and
An extremely simple demo of the
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: zoomable_image: ^1.3.1
2. Install it
You can install packages from the command line:
$ 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:
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]
We analyzed this package on Oct 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.5.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.4
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Health issues and suggestions
lib/src/zoomable_image.dart. (-44.31 points)
lib/src/zoomable_image.dart failed with 2 errors, 2 hints:
line 174 col 30: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
line 186 col 33: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
line 10 col 1: This function has a return type of 'Size', but doesn't end with a return statement.
line 10 col 6: The declaration '_containmentSize' isn't referenced.
Maintenance issues and suggestions
Provide a file named
CHANGELOG.md. (-20 points)
Changelog entries help developers follow the progress of your package. See the example generated by
The package description is too short. (-11 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.