pinch_zoom_image_updated 0.2.6 copy "pinch_zoom_image_updated: ^0.2.6" to clipboard
pinch_zoom_image_updated: ^0.2.6 copied to clipboard

A widget that makes picture pinch zoom, then return back to initial size and position when released.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:pinch_zoom_image/pinch_zoom_image_updated.dart';
import 'package:cached_network_image/cached_network_image.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Pinch Zoom Image',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text('Pinch Zoom Image'),
        ),
        body: ListView(
          children: <Widget>[
            Container(
              padding: EdgeInsets.all(16.0),
              child: PinchZoomImage(
                image: Image.asset('images/camel.jpg'),
                zoomedBackgroundColor: Color.fromRGBO(240, 240, 240, 1.0),
                hideStatusBarWhileZooming: true,
                onZoomStart: () {
                  print('Zoom started');
                },
                onZoomEnd: () {
                  print('Zoom finished');
                },
              ),
            ),
            Container(
              padding: EdgeInsets.all(16.0),
              child: PinchZoomImage(
                image: CachedNetworkImage(
                  imageUrl: 'https://i.imgur.com/tKg0XEb.jpg',
                ),
                zoomedBackgroundColor: Color.fromRGBO(240, 240, 240, 1.0),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
27
likes
30
pub points
36%
popularity

Publisher

unverified uploader

A widget that makes picture pinch zoom, then return back to initial size and position when released.

Repository (GitHub)
View/report issues

License

ISC (license)

Dependencies

flutter

More

Packages that depend on pinch_zoom_image_updated