我在为flutter项目添加web支持时遇到此错误。应用程序适用于Android和IOS。但是当在chrome上运行项目时,它加载但显示空白屏幕。
Chrome控制台:
errors.dart:266 Uncaught (in promise) Error: MissingPluginException(No implementation found for method getApplicationSupportDirectory on channel plugins.flutter.io/path_provider)
at Object.throw_ [as throw] (errors.dart:266:49)
at MethodChannel._invokeMethod (platform_channel.dart:294:7)
at _invokeMethod.next (<anonymous>)
at async_patch.dart:45:50
at _RootZone.runUnary (zone.dart:1653:54)
at _FutureListener.thenAwait.handleValue (future_impl.dart:147:18)
at handleValueCallback (future_impl.dart:766:44)
at _Future._propagateToListeners (future_impl.dart:795:13)
at [_completeWithValue] (future_impl.dart:566:5)
at async._AsyncCallbackEntry.new.callback (future_impl.dart:639:7)
at Object._microtaskLoop (schedule_microtask.dart:40:11)
at _startMicrotaskLoop (schedule_microtask.dart:49:5)
at async_patch.dart:166:15
在path_provider文档中明确提到它只支持Android, iOS, Linux, macOS, Windows平台。