SceneController constructor
SceneController({
- Scene? scene,
- PointerInputSettings? pointerSettings,
- double? dragStartSlop,
- NodeId nodeIdGenerator()?,
Creates a controller that edits scene.
nodeIdGenerator lets you override how node IDs are produced for nodes
created by this controller. By default, IDs are node-{n} with a
per-controller counter and are guaranteed to be unique within the scene at
generation time. If you override the generator, ensure IDs stay unique in
the scene.
Implementation
SceneController({
Scene? scene,
PointerInputSettings? pointerSettings,
double? dragStartSlop,
NodeId Function()? nodeIdGenerator,
}) : scene = scene ?? Scene(),
pointerSettings = pointerSettings ?? const PointerInputSettings(),
_dragStartSlop = dragStartSlop {
_nodeIdGenerator = nodeIdGenerator ?? _defaultNodeIdGenerator;
_repaintScheduler = RepaintScheduler(notifyListeners: notifyListeners);
_actionDispatcher = ActionDispatcher();
_selectionModel = SelectionModel();
_moveModeEngine = MoveModeEngine(_contracts);
_drawModeEngine = DrawModeEngine(_contracts);
_sceneCommands = SceneCommands(_contracts);
}