This one is a bit of toughie. So the way the form validation works is you create a formKey at the start, and for every field you want to validate you add that specific key and a validation method. When you run the validator, you give it the key to search all the validation methods by and run anything that has that key attached. However, what if you make a custom alert that has its own form, inside another form? This is the root o four issue, and requires you to make a Custom alert dialog object that can makes it's own formKey.
I know what you're asking. But why not just make two formKeys called different things? When you create a formKey, you do so with some magic and my knowledge ends there.
This one is a bit of toughie. So the way the form validation works is you create a formKey at the start, and for every field you want to validate you add that specific key and a validation method. When you run the validator, you give it the key to search all the validation methods by and run anything that has that key attached. However, what if you make a custom alert that has its own form, inside another form? This is the root o four issue, and requires you to make a Custom alert dialog object that can makes it's own formKey.
I know what you're asking. But why not just make two formKeys called different things? When you create a formKey, you do so with some magic and my knowledge ends there.
This should help. https://stackoverflow.com/questions/53061369/how-to-validate-text-input-on-alertdialog-using-form-and-globalkey
Good luck and happy coding.