on-internet
← Community

How to display an error message if email and password is not valid in firebase flutter?

Stack Overflow ·

I have developed a login page. If the email and password matches from the database, it should successfully log in and move to the new page, but if it's wrong I want to display an error message: "email or password doesn't match". Here's my code: class _AdminLoginState extends State<AdminLogin> { String _username, _password; TextEditingController _email = TextEditingController(); final GlobalKey<FormState> _formkey = GlobalKey<FormState>(); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('LOGIN'), backgroundColor: Colors.indigo[900], ), body: SingleChi

Comments

Sign in or sign up to comment and upvote.

No comments yet.