I'm trying to make a row appear after the onError event activates, my idea is to do something like what's in the code, but I can't figure that out
signInAndUpButton(context, true, () {
FirebaseAuth.instance
.signInWithEmailAndPassword(
email: _emailTextController.text,
password: _passwordTextController.text)
.then((value) {
print("Signed in");
Navigator.pushNamed(context, "/Profile");
}).onError((error, stackTrace) {
print("incorrect Password");
incorrectPassword(); //this method would add the row to the app's screen
});
})
Row incorrectPassword() {
return new Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("E-mail ou senha incorretos, ",
style: TextStyle(color: hexStringToColor("#2c3333"))),
GestureDetector(
onTap: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => ForgotPassword()));
},
child: Text(
"Esqueceu sua senha?",
style: TextStyle(
decoration: TextDecoration.underline,
color: hexStringToColor("#252B2B"),
fontWeight: FontWeight.bold),
))
],
);
}