0

Flutter_facebook_connect

I updated my info.plist, and my app is registered on facebook developer with http://localhost:8080 as the OAuth redirect URL, but I got this MissingPluginException.

After looking it up, someone suggested adding SharedPreferences.setMockInitialValues({});

This got rid of the the error but flutter_facebook_connect is still not working. Is there something I could be missing?

Wilson Wilson
  • 2,367
  • 13
  • 43
  • How is it not working? Your question is difficult to answer without specifics. – Sam Nov 08 '17 at 01:59
  • So I'm pretty sure the flutterWebviewPlugin is what's causing the problem. Flutter_facebook_connect uses the web view Plugin to launch the url. I tried just extracting that bit and doing a flutterWebviewPlugin.launch("http://google.com"); and the app did not launch the web view at all. – Michael Brant Nov 08 '17 at 02:16
  • Yeah flutterWebviewPlugin is throwing an unhandled exception and then directing me to platform_channel.dart and highlights this line: throw new MissingPluginException("No implementation found for method $method on channel $name"); – Michael Brant Nov 08 '17 at 02:28
  • Does this answer your question? [Flutter: Unhandled exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared\_preferences)](https://stackoverflow.com/questions/50687801/flutter-unhandled-exception-missingpluginexceptionno-implementation-found-for) – Petrus Nguyễn Thái Học Mar 01 '21 at 07:49

1 Answers1

0

MissingPluginException thrown by plugins usually occurs when the plugin wasn't properly "injected" in the Flutter project.

If you are using hot restart or hot reload after adding the plugin, this may not be able inject plugin dependencies into the platform-specific parts of the app, hot restart/hot reload is not enough to trigger the injection. What you can do here is run flutter clean and flutter pub get to rebuild the dependencies used in the project.

Omatt
  • 5,027
  • 2
  • 25
  • 83