getState method
Retrieves the nearest ancestor BlocxFormWidgetState from the widget tree.
Used internally to call submit when onPressed is null.
Throws if no ancestor state is found.
Implementation
BlocxFormWidgetState<BlocxFormWidget<P>, F, P, E> getState(BuildContext context) =>
context.findAncestorStateOfType<BlocxFormWidgetState<BlocxFormWidget<P>, F, P, E>>()!;