自动化脚本:flutter packages pub run build_runner build --delete-conflicting-outputs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[SEVERE] json_serializable:json_serializable on lib/model/business/json_bean.dart:
Could not generate `fromJson` code for `data` because of type `T` (type parameter). To support type parameters (generic types) you can: * Use `JsonConverter` https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonConverter-class.html * Use `JsonKey` fields `fromJson` and `toJson` https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/fromJson.html https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/toJson.html * Set `JsonSerializable.genericArgumentFactories` to `true` https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonSerializable/genericArgumentFactories.html package:insight_bank/model/business/json_bean.dart:8:11 ╷ 8 │ final T data; │ ^^^^ ╵