interactiveViewer method

Widget interactiveViewer({
  1. Key? key,
  2. Clip clipBehavior = Clip.hardEdge,
  3. @Deprecated('Use panAxis instead. ' 'This feature was deprecated after v3.3.0-0.5.pre.') bool alignPanAxis = false,
  4. PanAxis panAxis = PanAxis.free,
  5. EdgeInsets boundaryMargin = EdgeInsets.zero,
  6. bool constrained = true,
  7. double maxScale = 2.5,
  8. double minScale = 0.8,
  9. double interactionEndFrictionCoefficient = 0.0000135,
  10. GestureScaleEndCallback? onInteractionEnd,
  11. GestureScaleStartCallback? onInteractionStart,
  12. GestureScaleUpdateCallback? onInteractionUpdate,
  13. bool panEnabled = true,
  14. bool scaleEnabled = true,
  15. double scaleFactor = kDefaultMouseScrollToScaleFactor,
  16. TransformationController? transformationController,
  17. Alignment? alignment,
  18. bool trackpadScrollCausesScale = false,
})

A widget that enables pan and zoom interactions with its child.

Implementation

Widget interactiveViewer({
  Key? key,
  Clip clipBehavior = Clip.hardEdge,
  @Deprecated('Use panAxis instead. '
      'This feature was deprecated after v3.3.0-0.5.pre.')
  bool alignPanAxis = false,
  PanAxis panAxis = PanAxis.free,
  EdgeInsets boundaryMargin = EdgeInsets.zero,
  bool constrained = true,
  double maxScale = 2.5,
  double minScale = 0.8,
  double interactionEndFrictionCoefficient = 0.0000135,
  GestureScaleEndCallback? onInteractionEnd,
  GestureScaleStartCallback? onInteractionStart,
  GestureScaleUpdateCallback? onInteractionUpdate,
  bool panEnabled = true,
  bool scaleEnabled = true,
  double scaleFactor = kDefaultMouseScrollToScaleFactor,
  TransformationController? transformationController,
  Alignment? alignment,
  bool trackpadScrollCausesScale = false,
}) {
  return InteractiveViewer(
    key: key,
    clipBehavior: clipBehavior,
    panAxis: panAxis,
    boundaryMargin: boundaryMargin,
    constrained: constrained,
    maxScale: maxScale,
    minScale: minScale,
    interactionEndFrictionCoefficient: interactionEndFrictionCoefficient,
    onInteractionEnd: onInteractionEnd,
    onInteractionStart: onInteractionStart,
    onInteractionUpdate: onInteractionUpdate,
    panEnabled: panEnabled,
    scaleEnabled: scaleEnabled,
    scaleFactor: scaleFactor,
    transformationController: transformationController,
    alignment: alignment,
    trackpadScrollCausesScale: trackpadScrollCausesScale,
    child: this,
  );
}