zoomable_widget 0.0.6 copy "zoomable_widget: ^0.0.6" to clipboard
zoomable_widget: ^0.0.6 copied to clipboard

A versatile zooming widget suitable for all platforms, with a focus on desktop users who can activate zoom by pressing the left mouse button and scrolling.

zoomable_widget #

A Flutter package providing a widget for interactive viewing of widgets with pan, zoom, and rotation gestures. Designed to enhance the Flutter InteractiveViewer widget with additional features like constrained zooming with mouse scroll when holding down the left mouse button, this package is perfect for applications requiring interactive elements, such as image galleries, maps, and document viewers.

Features #

  • Pan, zoom, and rotate interactions with custom constraints.
  • Enhanced mouse interaction: Zoom with mouse scroll when holding the left mouse button.
  • Easy integration with existing Flutter projects.
  • Customizable boundary margins, minimum and maximum scale values.
  • Supports both predefined child widgets and builder methods for dynamic content.

Getting Started #

To use the Custom Interactive Viewer in your Flutter app, add the package to your project's pubspec.yaml file:

dependencies:
  zoomable_widget: ^0.0.6

Then, import the package in your Dart file:

import 'package:custom_interactive_viewer/custom_interactive_viewer.dart';

Usage #


Zoomable(
maxScale: 2.5,
minScale: 0.8,
panAxis: PanAxis.free,
clipBehavior: Clip.hardEdge,
child: Image.asset('assets/my_image.png'),
)

For dynamic content based on the viewport, use the builder constructor:


Zoomable.builder(
builder: (BuildContext context, Quad viewport) {
// Return your widget based on the viewport.
// This is ideal for large or infinite content like maps.
return MyCustomWidget(viewport: viewport);
},
)

5
likes
125
points
470
downloads

Publisher

unverified uploader

Weekly Downloads

A versatile zooming widget suitable for all platforms, with a focus on desktop users who can activate zoom by pressing the left mouse button and scrolling.

Documentation

API reference

License

unknown (license)

Dependencies

flutter, vector_math

More

Packages that depend on zoomable_widget