context property

BuildContext get context

The element of the widget whose build uses the hook, from the first use until dispose returns.

Implementation

BuildContext get context {
  assert(_element != null, 'the context of $this used after dispose()');
  return _element!;
}