'I have a problem creating a user using the firebase, FirebaseAuth

I did the authentication, but when I click to create an account it throws an error:

MissingPluginException(No implementation found for method createUserWithEmailAndPassword on channel plugins.flutter.io/firebase_auth)

enter image description here

  final _auth = FirebaseAuth.instance;

  void _submitAuthForm(String email, String user, String pass, bool isLogin , context) async  {
    AuthResult authResult;
    try {
      if (isLogin) {
        authResult = await _auth.signInWithEmailAndPassword(
            email: email, password: pass);
      } else {
        authResult = await _auth.createUserWithEmailAndPassword(
            email: email, password: pass);
      }
    } on PlatformException catch (err) {
      var errorMessage = 'An error ocurred. Please check your credentials.';
      if (err.message != null) {
        errorMessage = err.message!;
      }

      showDialog(
        context: context,
        builder: (context) => AlertDialog(
          content: Text(errorMessage),
          actions: [
            TextButton(
              onPressed: () {
                Navigator.of(context).pop();
              },
              child: Text('OK'),
            ),
          ],
        ),
      );
    } catch (error) {
      print(error);
    }
  }



Solution 1:[1]

Make sure you have enabled Sign-in with Email/Password in Firebase Console. Also, try updating packages to the latest version. Along with that do upgrade your flutter version as well. Once you did all that, try running flutter clean and re-running your project. Cheers!! Hope it works.

Solution 2:[2]

Solution:

  1. stop the app enter image description here
  2. run the app again

Hope it helps!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sathya Srivatsav G
Solution 2 liam spiegel