flutter pub add json_annotation dev:build_runner dev:json_serializable 序列号类自动生产:在需要序列化的类上加上@JsonSerializable()注解,然后运行命令:flutter pub run build_runner build
dart run build_runner build --delete-conflicting-outputs
https://github.com/google/json_serializable.dart/blob/master/example/lib/example.dart
A new Flutter project.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.