Flutter get-cli中运行get init初始化项目会提示如下错误:
get init
s E:\flutter\flutter study\tempstudy\misapp01> get init
1)Getx Pattern (by Kauê)
2)CLEAN (by Arktekko)
which architecture do you want to use? [1] unhandled exception:
Synchromus waiting using dart:cli waitfor and c Ap art aitforEvent is deprecated am disabled by defaut, this featwre will be fully remwed in art 34 release. you can aurently still enable
--enable deprecated wait for to the Dart vm, see https://dartbug.com/52121.
C: \Users \Administrator AppDatalLocal\Pub\cache hosted pub,flutter-io.cniget cli-1.8.4\binget.dart 18:23 main
package:dcli/src/util/wait for ex.dart 35:28
package:dcli/src/functions/echo.dart 34:5
package:dcli/src/functions/echo.dart 24:13
....
dart:isolate-patch/isolate patch.dart 295:33
dart:isolate-patch/isolate patch.dart 184:12
get init初始化错误的解决办法:
终端输入:
dart pub global deactivate get_cli
dart pub global activate -s git https://github.com/knottx/get_cli.git --git-ref knottx
详情参考:Get_cli errors on the latest version of flutter · Issue #243 · jonataslaw/get_cli · GitHub
Flutter3.x零基础入门教程学习:
Dart Flutter教程