我想将 GET_CLI 添加到我的项目版本 1.8.4 我有 Flutter 3.19.4 通道稳定版和 Dart 3.3.2。 我收到错误消息
Synchronous waiting using dart:cli waitFor and C API Dart_WaitForEvent is deprecated and disabled by default. This feature will be fully removed in Dart 3.4 release. You can currently still enable it by passing --enable_deprecated_wait_for to the Dart VM. See https://dartbug.com/52121.
我添加了路径,但错误在于 Dart_WaitForEvent,我该如何解决此问题,或者如何按照建议 --enable_deprecated_wait_for 到 Dart VM?
您需要将
--enable_deprecated_wait_for
标志传递给 Dart VM。
如果您使用命令行运行 Flutter 项目,则可以在运行 Flutter 应用程序时添加此标志。
flutter run --enable-deprecated-wait-for
或者,如果您直接运行 Dart 代码,则可以使用 dart 命令:
dart --enable-deprecated-wait-for your_file.dart
确保将 your_file.dart 替换为 Dart 文件的路径。