maybeControllerOf static method

GFormController? maybeControllerOf(
  1. BuildContext context
)

Looks up the nearest enclosing GFormController, or null if none.

Implementation

static GFormController? maybeControllerOf(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<_GFormScope>()
      ?.controller;
}