flutter_zoom_box 0.1.5

Flutter Android iOS

A box that makes child widgets zoomable and draggable inside container like box.

flutter_zoom_box #

A widget that makes child widget zoomable. This widget can be applicable for not only images but also any other widgets.

zoom_box_demo zoom_box2_demo

It works on Android and iOS.

How to use #

import 'package:flutter_zoom_box/zoom_box.dart';

Use widget named 'ZoomBox' and give width, height and child which you want to wrap with as parameters. These three parameters are required ones.

Scaffold(
  body: Center(
    child: ZoomBox(
    width: 250,
    height: 250,
    child: Image.network('https://picsum.photos/250?image=9'),
    ),
  )
)

Additionally, if you want to add a border in ZoomBox like gif shown, refer to the codes below.


double borderWidth = 4;
double radius = 20;

return Scaffold(
  body: Center(
    child: Container(
      decoration: BoxDecoration(
        borderRadius: BorderRadius.all(Radius.circular(radius + borderWidth)),
        border: Border.all(width: borderWidth)),
      child: ZoomBox(
        borderRadius: BorderRadius.all(Radius.circular(radius)),
        width: 250,
        height: 250,
        child: Image.network('https://picsum.photos/250?image=9'),
      ),
    ),
  )
);
7
likes
90
pub points
55%
popularity

A box that makes child widgets zoomable and draggable inside container like box.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

ndh8392@gmail.com

License

BSD (LICENSE)

Dependencies

flutter, provider, vector_math

More

Packages that depend on flutter_zoom_box