【发布时间】:2020-08-20 22:06:55
【问题描述】:
如何在 Windows 的 Flutter 桌面中保存和打开文件。 getApplicationDocumentsDirectory 不适用于 Windows 应用程序的颤振桌面
Future<String> get _localPath async {
final directory = await getApplicationDocumentsDirectory();
print('$directory');
return directory.path;
}
抛出错误。
Exception has occurred
MissingPluginException (MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider))
【问题讨论】:
-
@AlexJean 这不适用于 Windows 应用程序,因为它适用于 Android,您可以自己尝试。
-
那个链接对你有帮助吗? stackoverflow.com/questions/57741142/…我看到有人对你投了反对票。对我来说有点不公平,尤其是他们没有评论他们为什么这样做。
标签: android windows flutter dart desktop