of static method

EasyFormState? of(
  1. BuildContext context
)

Returns the closest EasyFormState which encloses the given context.

Typical usage is as follows:

EasyFormState form = EasyForm.of(context);
form.save();

Implementation

static EasyFormState? of(BuildContext context) {
  final _FormScope? scope =
      context.dependOnInheritedWidgetOfExactType<_FormScope>();
  return scope?._formState;
}