of<T extends Auth<AuthKeys>> static method

AuthProvider<T> of<T extends Auth<AuthKeys>>(
  1. BuildContext context
)

Implementation

static AuthProvider<T> of<T extends Auth>(BuildContext context) {
  final owner = maybeOf<T>(context);
  if (owner == null) {
    throw AuthProviderException(
      'No AuthProvider<$T> found in the widget tree. '
      'Ensure that AuthProvider<$T>(...) wraps the widget calling this.',
    );
  }
  return owner;
}