我正试图用DART 2编写一个简单的命令行程序。我以前用过dart 2,但是在运行我的命令行应用程序时,我不能让它正常工作。
我收到以下错误:
NoSuchMethodError: Attempted to use type '_Testtt' as a function. Since types do not define a method 'call', this is not possible. Did you intend to call the _Testtt constructor and forget the 'new' operator?
Receiver: _Testtt
我相信我的课没有什么问题。另外,在vs代码中,它认识到它实际上是一个构造函数。
我用的是飞镖版本,随船飘动。
有人有主意吗?
DART版本:
Dart VM version: 2.0.0-dev.59.0.flutter-ff815d05a5 (Tue May 29 20:01:09 2018 +0000) on "windows_x64"
公共规范:
environment:
sdk: '>=2.0.0-dev.55.0 <2.0.0'
dependencies:
http: "^0.11.3+16"
dev_dependencies:
test: ^0.12.30