You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
an error is thrown as ReactiveForm.of returns null. Calling the same function with a submit button works fine. Is there any way that onWillPop could be changed so it is thrown after the form is initialized?
The text was updated successfully, but these errors were encountered:
Based on the example you wrote above, the context object you are passing to your _onWillPop() does not include the ReactiveForm widget. You are providing the context of the parent widget and not the context of the ReactiveForm widget. Instead, you can directly pass the form object to your _onWillPop method.
I'm trying to use the
ReactiveForms onWillPop
to handle saving to a database. I have it set up like this.In the following code:
an error is thrown as
ReactiveForm.of
returnsnull
. Calling the same function with a submit button works fine. Is there any way that onWillPop could be changed so it is thrown after the form is initialized?The text was updated successfully, but these errors were encountered: