LazyCanvasController constructor

LazyCanvasController({
  1. bool debug = false,
  2. Offset? buildCacheExtent,
  3. Size hashCellSize = const Size(100, 100),
  4. Duration defaultAnimationDuration = const Duration(milliseconds: 300),
  5. CanvasBackground background = const DotGridBackground(),
  6. bool useIdsFromArgs = false,
  7. OnWidgetEnteredRender? onWidgetEnteredRender,
  8. OnWidgetExitedRender? onWidgetExitedRender,
  9. PointerSignalEventListener? rawPointerSignalListener,
  10. PointerDownEventListener? rawPointerDownListener,
  11. PointerMoveEventListener? rawPointerMoveListener,
  12. PointerUpEventListener? rawPointerUpListener,
  13. PointerCancelEventListener? rawPointerCancelListener,
})

Implementation

LazyCanvasController({
  this.debug = false,
  Offset? buildCacheExtent,
  Size hashCellSize = const Size(100, 100),
  this.defaultAnimationDuration = const Duration(milliseconds: 300),
  this.background = const DotGridBackground(),
  this.useIdsFromArgs = false,
  this.onWidgetEnteredRender,
  this.onWidgetExitedRender,
  this.rawPointerSignalListener,
  this.rawPointerDownListener,
  this.rawPointerMoveListener,
  this.rawPointerUpListener,
  this.rawPointerCancelListener,
}) : _hashCellSize = hashCellSize,
     _buildCacheExtent = buildCacheExtent != null ? buildCacheExtent + _kBuildCacheBuffer : null
// only top left is considered so if a widget has long width, it'll not be rendered
// unless the cache extent is sufficient
{
  _spatialHash = SpatialHashing<CanvasChildId>(cellSize: _hashCellSize);
}