of static method

Retrieves the nearest CanvasTransformProvider ancestor from the widget tree.

Returns null if no provider is found.

Implementation

static CanvasTransformProvider? of(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<CanvasTransformProvider>();
}