of method

MaterialInkController of (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);

Implementation

static MaterialInkController of(BuildContext context) {
  final _RenderInkFeatures result = context.ancestorRenderObjectOfType(const TypeMatcher<_RenderInkFeatures>());
  return result;
}