containerOf method Null safety

RenderBox? containerOf(
  1. BuildContext context
)

The RenderBox that defines this decorator's "container". That's the area which is filled if InputDecoration.filled is true. It's the area adjacent to InputDecoration.icon and above the widgets that contain InputDecoration.helperText, InputDecoration.errorText, and InputDecoration.counterText.

TextField renders ink splashes within the container.

Implementation

static RenderBox? containerOf(BuildContext context) {
  final _RenderDecoration? result = context.findAncestorRenderObjectOfType<_RenderDecoration>();
  return result?.container;
}