I linked my app with firebase but when I try to signup with a new user in the app I am getting this error: Ignoring header X-Firebase-Locale because its value was null. that is the auth screen code:
class Authscreen extends StatefulWidget {
@override
Authscreenstate createState() => Authscreenstate();
}
final auth = FirebaseAuth.instance;
class Authscreenstate extends State<Authscreen> {
void submitauthform(String email, String password, String username,
bool islogin, BuildContext ctx) async {
UserCredential authres;
try {
if (islogin == true) {
authres = await auth.signInWithEmailAndPassword(
email: email, password: password);
} else {
authres = await auth.createUserWithEmailAndPassword(
email: email, password: password);
}
} on FirebaseAuthException catch (e) {
String message = "error";
if (e.code == 'weak-password') {
message = 'The password provided is too weak.';
} else if (e.code == 'email-already-in-use') {
message = 'The account already exists for that email.';
} else if (e.code == 'user-not-found') {
message = 'No user found for this email.';
} else if (e.code == 'wrong-password') {
message = 'Wrong user privded for that user';
}
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(message),
backgroundColor: Theme.of(ctx).errorColor,
),
);
} catch (e) {
print(e);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Theme.of(context).accentColor,
body: Authform(submitauthform),
);
}
}