of static method

Returns the closest EasyFormDefaultSettings which encloses the given context.

If no ancestor is found, this method will assert in debug mode, and throw an exception in release mode.

Calling this method will create a dependency on the closest EasyFormDefaultSettings in the context, if there is one.

Implementation

static EasyFormDefaultSettings of(BuildContext context) {
  final EasyFormDefaultSettings? result = maybeOf(context);
  assert(result != null, 'No EasyFormDefaultSettings found in context');
  return result!;
}