Вот код, который я хочу добавить предупреждение об ошибке и соответствующую проверку.
TextField(
controller: emailController,
decoration: InputDecoration(
hintText: '[email protected]',
labelText: 'Email',
// icon: Icon(Icons.mail),
suffixIcon: emailController.text.isEmpty
? Container(width: 0)
: IconButton(
icon: Icon(Icons.close),
onPressed: () => emailController.clear(),
),
border: OutlineInputBorder(),
focusColor: Colors.red
),
keyboardType: TextInputType.emailAddress,
textInputAction: TextInputAction.done,
// autofocus: true,
),
Как сделать так, чтобы появилось предупреждение об ошибке, если человек не вставил @ gmail.com Сообщение об ошибке выглядит а>