json_model
json_model copied to clipboard
运行`flutter packages pub run json_model` 命令报错
The method 'cleanFor' isn't defined for the class 'CleanCommand'.
- 'CleanCommand' is from 'file:///Users/canday/.pub-cache/hosted/pub.flutter-io.cn/json_model-0.0.2/bin/src/commands/clean.dart'. Try correcting the name to the name of an existing method, or defining a method named 'cleanFor'. await cleanFor(assetGraphPathFor(scriptLocation), logger);
json文件是没有问题的,但是还是报这个错误
- 'CleanCommand' is from '../../../flutter/.pub-cache/hosted/pub.flutter-io.cn/json_model-0.0.2/bin/src/commands/clean.dart'. Try correcting the name to the name of an existing method, or defining a method named 'cleanFor'. await cleanFor(assetGraphPathFor(scriptLocation), logger);
同样遇到这个问题 @chenjianjun571 是否已解决了呢?
修改dev_dependencies:build_runner: ^1.6.0 @chenjianjun571