I'm writing a widget test for a Flutter form, and want to verify that after form submission, validation fails, and errorText for one of the fields is displayed and is as expected.
The code for the field looks like:
Form(key: _formKey, ...
TextFormField(validator: validateEmail, ...)
For the test assertion, I've tried things like
expect(find.text('Please fill in your email.'), findsOneWidget);
With no success. Hoping someone can point me in the right direction.
