Ahmadre / FlutterIconPicker

An adaptive comprehensive IconPicker for Flutter
MIT License
112 stars 75 forks source link

Error : "Synchronous waiting using dart:cli waitFor" #66

Closed Skyost closed 1 month ago

Skyost commented 4 months ago

Hey,

Using the provided command at the bottom of the README, I get the following error :

> dart run flutter_iconpicker:generate_packs --packs material
Building package executable... 
Built flutter_iconpicker:generate_packs.
Unhandled exception:
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:cli-patch/cli_patch.dart 9:47                                                                          _waitForEvent
dart:cli/wait_for.dart 64:12                                                                                _WaitForUtils.waitForEvent
dart:cli/wait_for.dart 152:19                                                                               waitFor
package:dcli/src/util/wait_for_ex.dart 38:17                                                                waitForEx
package:dcli/src/functions/copy_tree.dart 73:5                                                              copyTree
C:\Users\Hugo\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_iconpicker-3.4.4\bin\generate_packs.dart 80:5  emptyIconPacks
C:\Users\Hugo\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_iconpicker-3.4.4\bin\generate_packs.dart 48:3  main
package:dcli/src/util/wait_for_ex.dart 35:28                                                                waitForEx
package:dcli/src/functions/copy_tree.dart 73:5                                                              copyTree
C:\Users\Hugo\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_iconpicker-3.4.4\bin\generate_packs.dart 80:5  emptyIconPacks
C:\Users\Hugo\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_iconpicker-3.4.4\bin\generate_packs.dart 48:3  main

(Also, the link to Models/IconPack is broken).

Skyost commented 4 months ago

Oh, and as the error message suggests, it's possible to run the command using :

dart --enable_deprecated_wait_for run flutter_iconpicker:generate_packs --packs material

But this may not be suitable for long term 🙂

tkortekaas commented 2 months ago

@Skyost it indeed does not work long term, because this command doesn't work anymore for Flutter 3.22...

vtd182 commented 1 month ago

in my flutter, the command

Oh, and as the error message suggests, it's possible to run the command using :

dart --enable_deprecated_wait_for run flutter_iconpicker:generate_packs --packs material

But this may not be suitable for long term 🙂

in my flutter, this command doesnt work. I want to find an alternative solution...

Ahmadre commented 1 month ago

Oh, and as the error message suggests, it's possible to run the command using :

dart --enable_deprecated_wait_for run flutter_iconpicker:generate_packs --packs material

But this may not be suitable for long term 🙂

Thank you @Skyost and @tkortekaas for your hints here.

I will focus on this and fix this bug in the next release.

Ahmadre commented 1 month ago

Bug is fixed. A new version will come today.

Ahmadre commented 1 month ago

Fixed with the new version: 3.4.5. Let me know if this solved your error (consider re-downloading your pub package)