更新时间:2022-06-23 05:12:55
我本人只是遇到了这个问题,看起来dart:io库不适用于Web应用程序.
I just ran into this problem myself, looks like the dart:io library won't work with web applications.
来自: https://api.flutter.dev/flutter/dart-io/dart-io-library.html
重要提示:基于浏览器的应用程序无法使用此库.只有服务器,命令行脚本和Flutter移动应用程序才能导入和使用dart:io.
Important: Browser-based applications can't use this library. Only servers, command-line scripts, and Flutter mobile apps can import and use dart:io.