InteractiveViewerModifier.builder constructor

const InteractiveViewerModifier.builder({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. Clip clipBehavior = Clip.hardEdge,
  5. bool alignPanAxis = false,
  6. EdgeInsets boundaryMargin = EdgeInsets.zero,
  7. double maxScale = 2.5,
  8. double minScale = 0.8,
  9. GestureScaleEndCallback? onInteractionEnd,
  10. GestureScaleStartCallback? onInteractionStart,
  11. GestureScaleUpdateCallback? onInteractionUpdate,
  12. bool panEnabled = true,
  13. bool scaleEnabled = true,
  14. double scaleFactor = 200.0,
  15. TransformationController? transformationController,
  16. required InteractiveViewerModifierBuilder builder,
})

Creates an InteractiveViewer for a child that is created on demand.

Can be used to render a child that changes in response to the current transformation.

The builder parameter must not be null. See its docs for an example of using it to optimize a large child.

Implementation

const InteractiveViewerModifier.builder({
  super.key,
  super.child,
  super.modifierKey,
  this.clipBehavior = Clip.hardEdge,
  this.alignPanAxis = false,
  this.boundaryMargin = EdgeInsets.zero,
  this.maxScale = 2.5,
  this.minScale = 0.8,
  this.onInteractionEnd,
  this.onInteractionStart,
  this.onInteractionUpdate,
  this.panEnabled = true,
  this.scaleEnabled = true,
  this.scaleFactor = 200.0,
  this.transformationController,
  required InteractiveViewerModifierBuilder this.builder,
}) : constrained = false;