of static method

FirestoreUserForm? of(
  1. BuildContext context, {
  2. bool listen = true,
})

Implementation

static FirestoreUserForm? of(
  BuildContext context, {
  bool listen = true,
}) {
  if (listen) {
    return context
        .dependOnInheritedWidgetOfExactType<
            FirestoreUserFormInheritedStreamer>()
        ?.form;
  }

  final element = context.getElementForInheritedWidgetOfExactType<
      FirestoreUserFormInheritedStreamer>();
  return element == null
      ? null
      : (element.widget as FirestoreUserFormInheritedStreamer).form;
}