ZoomableWidget class

Inheritance

Constructors

ZoomableWidget({Key key, double minScale: 0.7, double maxScale: 1.4, double initialScale: 1.0, Offset initialOffset: Offset.zero, double initialRotation: 0.0, bool enableZoom: true, double panLimit: 1.0, bool singleFingerPan: true, bool multiFingersPan: true, bool enableRotate: false, Widget child, VoidCallback onTap, int zoomSteps: 0, bool autoCenter: false, bool bounceBackBoundary: true, bool enableFling: true, double flingFactor: 1.0, ValueChanged<double> onZoomChanged, Duration resetDuration: const Duration(milliseconds: 250), Curve resetCurve: Curves.easeInOut})

Properties

autoCenter bool
Center offset when zooming to minimum scale.
final
bounceBackBoundary bool
Enable the bounce-back boundary.
final
child Widget
The child widget that is display.
final
enableFling bool
Allow fling child widget after panning.
final
enableRotate bool
Allow rotating the image.
final
enableZoom bool
Allow zooming the child widget.
final
flingFactor double
Greater value create greater fling distance.
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
initialOffset Offset
The initial offset.
final
initialRotation double
The initial rotation.
final
initialScale double
The initial scale.
final
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
maxScale double
The maximum size for scaling.
final
minScale double
The minimum size for scaling.
final
multiFingersPan bool
Allow panning with more than one finger.
final
onTap VoidCallback
Tap callback for this widget.
final
onZoomChanged ValueChanged<double>
When the scale value changed, the callback will be invoked.
final
panLimit double
Create a boundary with the factor.
final
resetCurve Curve
The curve of reset animation.
final
resetDuration Duration
The duration of reset animation.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
singleFingerPan bool
Allow panning with one finger.
final
zoomSteps int
Allow users to zoom with double tap steps by steps.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
createState() → _ZoomableWidgetState
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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
Returns 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. [...]
@nonVirtual, inherited