ZoomController class

A controller for managing zoom state externally.

Inheritance

Constructors

ZoomController({ZoomTransform? initialTransform, double minScale = 0.1, double maxScale = 10.0})
Creates a ZoomController.

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
maxScale → double
The maximum scale factor.
final
minScale → double
The minimum scale factor.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale → double
The current scale.
no setter
transform → ZoomTransform
The current transform.
no setter
translate → Offset
The current translation.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
panBy(Offset delta) → void
Pans by the given offset.
panTo(Offset position) → void
Pans to the given position.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset() → void
Resets to the identity transform.
setTransform(ZoomTransform transform) → void
Sets the transform.
toString() → String
A string representation of this object.
inherited
zoomIn([double factor = 1.2, Offset? focalPoint]) → void
Zooms in by the given factor.
zoomOut([double factor = 1.2, Offset? focalPoint]) → void
Zooms out by the given factor.
zoomTo(double scale, [Offset? focalPoint]) → void
Zooms to a specific scale.

Operators

operator ==(Object other) → bool
The equality operator.
inherited