Flutter 通过 source-gen 生成对应的model类
1. 命令
- 引入 part ‘xxx.g.dart’; 生成对应 xxx.g.dart 文件
1 | flutter pub run build_runner clean && flutter pub run build_runner build --delete-conflicting-outputs |
- 生成配置
1 | targets: |
Flutter 通过 source-gen 生成对应的model类
1 | flutter pub run build_runner clean && flutter pub run build_runner build --delete-conflicting-outputs |
1 | targets: |