scalable_image 1.1.2

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.

demo!

[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

example/README.md

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:


dependencies:
  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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
70
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
85
Learn more about scoring.

We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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.

Dependencies

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.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8