SceneView constructor

const SceneView({
  1. SceneController? controller,
  2. ImageResolver? imageResolver,
  3. SceneStaticLayerCache? staticLayerCache,
  4. ValueChanged<SceneController>? onControllerReady,
  5. PointerInputSettings? pointerSettings,
  6. double? dragStartSlop,
  7. String nodeIdGenerator()?,
  8. Color selectionColor = const Color(0xFF1565C0),
  9. double selectionStrokeWidth = 1,
  10. double gridStrokeWidth = 1,
  11. Key? key,
})

Creates a view for the provided controller.

If controller is null, the view creates and owns a controller with an empty scene. Use onControllerReady to access the internal controller once it is created.

When controller is null, pointerSettings, dragStartSlop, and nodeIdGenerator are used to configure the internal controller. These parameters are ignored when an external controller is provided.

If staticLayerCache is null, the view creates and owns an internal cache and disposes it when the view is disposed. If a cache is provided, the caller owns it and must dispose it.

Implementation

const SceneView({
  this.controller,
  this.imageResolver,
  this.staticLayerCache,
  this.onControllerReady,
  this.pointerSettings,
  this.dragStartSlop,
  this.nodeIdGenerator,
  this.selectionColor = const Color(0xFF1565C0),
  this.selectionStrokeWidth = 1,
  this.gridStrokeWidth = 1,
  super.key,
});