scalable_image 1.1.1

  • Example
  • Installing
  • Versions
  • 91


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.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


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

void main() {
  runApp(new MaterialApp(
      theme: new ThemeData(
          brightness: Brightness.dark,
      title: 'Scalable Image Example',
      home: new MainPage()
class MainPage extends StatelessWidget {
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: const Text('Scalable Image Example'),
        centerTitle: true,
      body: new Container(
        child: new ScalableImage(
          imageProvider: new AssetImage('assets/example.png'),
          dragSpeed: 4.0,
          maxScale: 16.0,
          wrapInAspect: false,
          enableScaling: true,

Use this package as a library

1. Depend on it

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

  scalable_image: ^1.1.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages 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';
Version Uploaded Documentation Archive
1.1.1 Apr 25, 2018 Go to the documentation of scalable_image 1.1.1 Download scalable_image 1.1.1 archive
1.1.0 Apr 25, 2018 Go to the documentation of scalable_image 1.1.0 Download scalable_image 1.1.0 archive
1.0.0 Apr 20, 2018 Go to the documentation of scalable_image 1.0.0 Download scalable_image 1.0.0 archive
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 Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6
  • Flutter: 0.11.3


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.


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
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8