of method Null safety
- BuildContext context
The ink controller from the closest instance of this class that encloses the given context.
Typical usage is as follows:
MaterialInkController inkController = Material.of(context);
This method can be expensive (it walks the element tree).
Implementation
static MaterialInkController? of(BuildContext context) {
return context.findAncestorRenderObjectOfType<_RenderInkFeatures>();
}