I'm gonna handle errors about createUserWithEmailAndPassword as follows;
class myComplete extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return TextButton(
child: Text("Register"),
onPressed: () async {
try{
final FirebaseAuth auth = FirebaseAuth.instance;
final UserCredential result = await auth.createUserWithEmailAndPassword(
email: emailController.text,
password: maskController.text,
);
dialogMsg(context, result.user);
} on FirebaseAuthException catch (e){
//here e.code
}
},
style: TextButton.styleFrom(
foregroundColor: MyStyle.mainColor,
),
);
}
}
And I found several type of errors in related docs here and there were errors such as invalid-email and weak-password.
However, I could not find like what kind of RegEx adopted for email-validation or how short password is defined as weak password. Where can I check out these default definitions?