我正在使用shared_preferences:^ 0.5.6。当我在workmanager中调用共享首选项时,出现以下错误。
Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
请帮忙。谢谢。
最佳答案
如果您使用的是shared_preferences 0.2.4及更高版本,请使用setMockInitialValues:
SharedPreferences.setMockInitialValues({}); // set initial values here if desired
原始答案link
关于flutter - 未处理的异常:MissingPluginException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59857278/