Zoomable class
A widget which handles the zooming and panning with considering its bounds based on the zoomLevel and child size.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Zoomable
Constructors
- Zoomable({Key? key, required ZoomableController controller, required Rect boundary, double minZoomLevel = 1.0, double maxZoomLevel = 15.0, bool enablePinching = true, bool enablePanning = true, bool enableDoubleTapZooming = true, double frictionCoefficient = 0.005, Duration animationDuration = const Duration(milliseconds: 600), ZoomableUpdateCallback? onWillUpdate, ZoomableCompleteCallback? onComplete, Widget? child})
-
Creates a Zoomable.
const
Properties
- animationDuration → Duration
-
An animation duration which is used to animate the zoom level and actual
rect property change using the given duration.
final
- boundary → Rect
-
A rect which is used to translate the controller matrix initially.
final
- child → Widget?
-
Specifies the child of the zoomable widget. It didn't get updated based on
the zoomable widget interaction or changes.
final
- controller → ZoomableController
-
Holds the details of the current zoom level and actual rect. These details
can be used in multiple widget which used the same zoomable widget.
final
- enableDoubleTapZooming → bool
-
Option to enable double tap zooming support.
final
- enablePanning → bool
-
Option to enable panning support.
final
- enablePinching → bool
-
Option to enable pinch zooming support.
final
- frictionCoefficient → double
-
In the inertial translation animation, this value is used as the
coefficient of friction.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxZoomLevel → double
-
Specifies the maximum zoomLevel of the widget.
final
- minZoomLevel → double
-
Specifies the minimum zoomLevel of the widget.
final
- onComplete → ZoomableCompleteCallback?
-
Called when the zoom level or actual rect updating has been completed.
final
- onWillUpdate → ZoomableUpdateCallback?
-
Called when there is a change in the zoom level or actual rect of the
zoomable widget.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ZoomableState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited