Package 

Class ZoomableKt

    • Method Summary

      Modifier and Type Method Description
      final static Modifier zoomable(Modifier $self, ZoomState zoomState, Boolean enableOneFingerZoom, Function1<Offset, Unit> onTap, SuspendFunction1<Offset, Unit> onDoubleTap) Modifier function that make the content zoomable.
      final static Unit toggleScale(ZoomState $self, Float targetScale, Offset position, AnimationSpec<Float> animationSpec) Toggle the scale between targetScale and 1.0f.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • zoomable

         final static Modifier zoomable(Modifier $self, ZoomState zoomState, Boolean enableOneFingerZoom, 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.
        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.