of static method

PrismFormController of(
  1. BuildContext context
)

The nearest controller; asserts when no PrismForm is above.

Implementation

static PrismFormController of(BuildContext context) {
  final scope = context.dependOnInheritedWidgetOfExactType<PrismFormScope>();
  assert(scope != null, 'PrismForm fields must be inside a PrismForm.');
  return scope!.notifier!;
}