Get_CLI not working with the latest update flutter/dart

102 Views Asked by At

i wanted to add GET_CLI to my project version 1.8.4 i have Flutter 3.19.4 channel stable and Dart 3.3.2. i got the error message

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.

i added the path but the error is with Dart_WaitForEvent, how can i fix this problem or how i --enable_deprecated_wait_for to the Dart VM as the suggestion ?

1

There are 1 best solutions below

0
On

You need to pass --enable_deprecated_wait_for flag to the Dart VM.

If you're running your Flutter project using the command line, you can add this flag when running your Flutter app.

flutter run --enable-deprecated-wait-for

Alternatively, if you're running the Dart code directly, you can use the dart command:

dart --enable-deprecated-wait-for your_file.dart

Ensure to replace your_file.dart with the path to your Dart file.