zoomable_image 1.3.1

zoomable_image #

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 example/ for squirrels.

demo!

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:zoomable_image/zoomable_image.dart';

void main() {
  runApp(
    new MaterialApp(
      home: new Scaffold(
        body: new ZoomableImage(
            new AssetImage('images/squirrel.jpg'),
            placeholder: const Center(child: const CircularProgressIndicator()),
            backgroundColor: Colors.red),
      ),
    ),
  );
}

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:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:zoomable_image/zoomable_image.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
86
Health:
Code health derived from static analysis. [more]
56
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
7
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.9+1
  • Flutter: 1.17.3

Health issues and suggestions

Fix lib/src/zoomable_image.dart. (-44.31 points)

Analysis of 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 6: 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

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Package is getting outdated. (-41.92 points)

The package was last published 74 weeks ago.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 < 3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.0
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8