scalable_image 1.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 87

scalable_image #

A widget that shows an image which can be scaled and dragged using gestures. This package was designed for quadratic images. It can happen that it don't behave as you expect for non quadratic images. A workaround is to wrap this image in an AspectRatio with an aspect ratio of the target image. This has the drawback that it does not fill the whole space while zooming since it will contain the aspect ratio. Feel free to fork on github.

Getting Started #

You can also try using an other ImageProvider, like NetworkImage and FileImage.

new ScalableImage(
          imageProvider: new AssetImage('assets/example.png'),
          dragSpeed: 4.0,
          maxScale: 16.0

That's all you need. See below and example/ for an example.


[1.1.2] - 01.08.2019

  • fix: Fixed to flutter 1.7.8+hotfix.4 (issue #1)

[1.1.1] - 25.04.2018

  • Added type (ImageProvider) to imageProvider in scalable_image.dart
  • Fixed library name

[1.1.0] - 25.04.2018

  • Added an option which allows to wrap the image in an AspectRatio
  • Added an option to lock scaling

[1.0.0] - 20.04.2018

  • Initial release


scalable_image_example #

An extremely simple demo of the scalable_image plugin.

Use this package as a library

1. Depend on it

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

  scalable_image: ^1.1.2

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:scalable_image/scalable_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 Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Format lib/scalable_image.dart.

Run flutter format to format lib/scalable_image.dart.

Format lib/src/scalable_image.dart.

Run flutter format to format lib/src/scalable_image.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8