Flutter: Not able to use Google and Facebook plugins together

1.2k views Asked by At

This is the first time in my life that I am asking a question in a forum. I am really desperate. I have added Google Signin with the plugin google_sign_in: ^4.5.6 to my app but as soon as I add the plugin flutter_facebook_auth: ^2.0.0+1 or flutter_facebook_login: ^3.0.0 and I start my app, I get the following error:

MissingPluginException (MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences))

Please help me! Thank you so much!

UPDATE: Flutter clean or rebuild did not help

4

There are 4 answers

0
Andrej On

You will have to find two versions of the plugins that work together. I had the same problem and I fixed by using these versions:

  flutter_login_facebook: ^0.2.1
  google_sign_in: ^4.5.6

I also suggest you to watch these videos, that will help you to correctly setup both Facebook and Google sign in:

Facebook sign in with Flutter and Firebase by Andy Julow - https://www.youtube.com/watch?v=_uYO2ht5Nl4

Google sign in with Flutter and Firebase by Andy Julow - https://www.youtube.com/watch?v=_uYO2ht5Nl4

I also had problems with implementing these sign in options at the same time and these videos helped me.

5
Q.u.a.n.g L. On

Run flutter clean (or remove your build manually). If u are on IOS run pod install and then and flutter run

Update 1: Check if the Shared Preference plugin has been already registerd inside the GeneratedPluginRegistrant ?

2
Chandan Singh On

Run flutter clean (or remove your build manually). If u are on IOS run pod install and then and flutter run

4
Shubham Narkhede On

For the reason you first need to Flutter clean and pub get and then pod install still issue is not solved then try with flutter clean then restart IDE and pub get. This will works for you.