我有以下两个类,其中一个类是从另一个类扩展而来的:
@JsonSerializable(nullable: true)
class Response {
final String responseCode;
final String responseMessage;
final String errorLog;
Response({this.errorLog, this.responseCode, this.responseMessage});
factory Response.fromJson(Map<String, dynamic> json) =>
_$ResponseFromJson(json);
}
Run Code Online (Sandbox Code Playgroud)
………………………………………………………………………………………………………………………………………………………… ......
@JsonSerializable(nullable: false)
class Verify extends Response {
Data data;
Verify({
this.data,
});
factory Verify.fromJson(Map<String, dynamic> json) => _$VerifyFromJson(json);
Map<String, dynamic> toJson() => _$VerifyToJson(this);
}
Run Code Online (Sandbox Code Playgroud)
每当我试图从验证类读取响应类属性时,总是为空
那么请如何实现这一目标?
最近,当我在调试中运行我的 flutter 应用程序时,我总是收到这样的消息:
[ZeroHung]zrhung_get_config: Get config failed for wp[0x0102]
Run Code Online (Sandbox Code Playgroud)
它会继续在控制台中打印这个 agin 和 agin 。
那么这是什么原因呢?我该如何阻止它?