useContext function

BuildContext useContext ()

Obtain the BuildContext of the building HookWidget.

Implementation

BuildContext useContext() {
  assert(HookElement._currentContext != null,
      '`useContext` can only be called from the build method of HookWidget');
  return HookElement._currentContext;
}