maybeControllerOf static method

JustFormController? maybeControllerOf(
  1. BuildContext context
)

Returns the JustFormController of the closest JustForm widget which encloses the given context.

Implementation

static JustFormController? maybeControllerOf(BuildContext context) {
  final scope = context.dependOnInheritedWidgetOfExactType<_JustFormScope>();
  return scope?.controller;
}