1.首先将json数据复制到一下网址可以得到一个类
https://caijinglong.github.io/json2dart/index_ch.html
2.在项目根目录中运行flutter packages pub run build_runner build会自动生成.g.dart文件
1.首先将json数据复制到一下网址可以得到一个类
https://caijinglong.github.io/json2dart/index_ch.html
2.在项目根目录中运行flutter packages pub run build_runner build会自动生成.g.dart文件