geofence_service icon indicating copy to clipboard operation
geofence_service copied to clipboard

Issue with shared_preferences package

Open bahag-roostap opened this issue 1 year ago • 2 comments

Hi Recently I added this package to our project in order to use the geo-fencing feature, but it seems that its dependencies use shared_preferences_ios which is incompatible with the latest shared_preferences package as "shared_preferences: ^2.0.18" it causes an error as follows:

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)

Could you please tell me what's going on?

bahag-roostap avatar Mar 12 '23 20:03 bahag-roostap

Same issue! Why this is happen?

aykuttasil avatar Mar 15 '23 16:03 aykuttasil

"I had the same error and I solved it by adding shared_preferences_ios: ^2.0.0 to my pubspec.yaml file."

"shared_preferences_ios" is a Flutter package that provides a simple way to store and retrieve data in the persistent memory of the device. The version "^2.0.0" of this package is compatible with iOS 14 and later versions.

To add this dependency to your pubspec.yaml file, you should follow these steps:

1-Open your Flutter project's pubspec.yaml file.

2-Look for the "dependencies" section in the file.

3-Add the dependency "shared_preferences_ios: ^2.0.0" at the end of the dependencies list.

4-Save the pubspec.yaml file.

hellodevstudio avatar Mar 19 '23 01:03 hellodevstudio