如下图,使用FlutterJsonBeanFactory工具生成的数据类
但是其中 生成的 import 'package:null/,导致的错误:Target of URI doesn’t exist: ‘package:null/generated/json/asd.g.dart’


尝试过的方法:
- 手动添加包名,但是不起效果,不知道什么问题以及如何解决

最终解决:
看官方文档或者直接看下面的步骤:https://flutter.cn/docs/development/data-and-backend/json#serializing-json-using-code-generation-libraries
步骤如下:
- 将json文件里面的内容复制到这个工具里面:https://caijinglong.github.io/json2dart/index_ch.html

- 根据网页提示的信息来创建文件
- 打开命令终端,输入如下命令:flutter pub run build_runner watch
然后就成功了








![[C国演义] 第十七章](https://img-blog.csdnimg.cn/8196d3a9c914459293cc9dc4472c2dc2.png)


![[数据结构]-二叉搜索树](https://img-blog.csdnimg.cn/c4cb9df7c88445cbb25e6fbd001762ab.png)







