LazyCanvasController constructor
LazyCanvasController({
- bool debug = false,
- Offset? buildCacheExtent,
- Size hashCellSize = const Size(100, 100),
- Duration defaultAnimationDuration = const Duration(milliseconds: 300),
- CanvasBackground background = const DotGridBackground(),
- bool useIdsFromArgs = false,
- OnWidgetEnteredRender? onWidgetEnteredRender,
- OnWidgetExitedRender? onWidgetExitedRender,
- PointerSignalEventListener? rawPointerSignalListener,
- PointerDownEventListener? rawPointerDownListener,
- PointerMoveEventListener? rawPointerMoveListener,
- PointerUpEventListener? rawPointerUpListener,
- 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);
}