So lets say I have 3 Pages : [StartingPage
, NamePage
, AdressPage
] inside a PageView.
Each of those children has a TextFormField inside it.
When I am at StartingPage
I want to call .validate()
on the keys of the TextFormFields on NamePage
and AdressPage
and I want the errorLabels
to show, when the user navigates to the other pages. The problem is that currently, the validation only works for the TextFormFields
that are on screen.
So basically there are two questions:
- Is it possible to pre-build pages of a pageview? Otherwise when I call
formFieldKey.currentState
the state is null if I haven't navigated to the respective page. - Is there another way to validate offscreen TextFormField content and show the errorlabel, when they come into view?