-
public final class ZoomableKt
-
-
Method Summary
Modifier and Type Method Description final static Modifierzoomable(Modifier $self, ZoomState zoomState, Boolean enableOneFingerZoom, ScrollGesturePropagation scrollGesturePropagation, Function1<Offset, Unit> onTap, SuspendFunction1<Offset, Unit> onDoubleTap)Modifier function that make the content zoomable. final static UnittoggleScale(ZoomState $self, Float targetScale, Offset position, AnimationSpec<Float> animationSpec)Toggle the scale between targetScale and 1.0f. -
-
Method Detail
-
zoomable
final static Modifier zoomable(Modifier $self, ZoomState zoomState, Boolean enableOneFingerZoom, ScrollGesturePropagation scrollGesturePropagation, Function1<Offset, Unit> onTap, SuspendFunction1<Offset, Unit> onDoubleTap)
Modifier function that make the content zoomable.
- Parameters:
zoomState- A ZoomState object.enableOneFingerZoom- If true, enable one finger zoom gesture, double tap followed by vertical scrolling.scrollGesturePropagation- specifies when scroll gestures are propagated to the parent composable element.onTap- will be called when single tap is detected on the element.onDoubleTap- will be called when double tap is detected on the element.
-
toggleScale
final static Unit toggleScale(ZoomState $self, Float targetScale, Offset position, AnimationSpec<Float> animationSpec)
Toggle the scale between targetScale and 1.0f.
- Parameters:
targetScale- Scale to be set if this function is called when the scale is 1.0f.position- Zoom around this point.animationSpec- The animation configuration.
-
-
-
-