I don't know i can't create user with email and password to firebase Here is my error
I am a newbie to flutter and firebase and i don't know why
D/EGL_emulation( 9585): eglMakeCurrent: 0xb1386320: ver 2 0 (tinfo 0xb1383e20)
I/art ( 9585): Do partial code cache collection, code=16KB, data=30KB
I/art ( 9585): After code cache collection, code=14KB, data=29KB
I/art ( 9585): Increasing code cache capacity to 128KB
3
D/InputConnectionAdaptor( 9585): The input method toggled cursor monitoring on
I/art ( 9585): Do partial code cache collection, code=49KB, data=62KB
I/art ( 9585): After code cache collection, code=49KB, data=62KB
I/art ( 9585): Increasing code cache capacity to 256KB
I/flutter ( 9585): dat@gmail.com
I/flutter ( 9585): error: [firebase_auth/unknown] Given String is empty or null
Here is my code with firebase --------
class _AuthScreenState extends State<AuthScreen> {
FirebaseAuth auth = FirebaseAuth.instance;
void _SubmiyAuthForm(
String email, String password, String username, bool isLogin) async {
UserCredential authResult;
try {
if (isLogin) {
authResult = await auth.signInWithEmailAndPassword(
email: email, password: password);
} else {
authResult = await auth.createUserWithEmailAndPassword(
email: email, password: password);
}
} on PlatformException catch (e) {
// TODO
var message = 'An error occured , please check ';
if (e.message != null) {
message = e.message!;
}
Scaffold.of(context).showBottomSheet(
(context) => SnackBar(
content: Text(message),
backgroundColor: Theme.of(context).errorColor,
),
);
} catch (E) {
print('error: ' + E.toString());
}
}