import 'package:json_annotation/json_annotation.dart'; part 'logistics.g.dart'; @JsonSerializable(explicitToJson: true) class Logistics { String? logisticCode = ''; String? shipperCode = ''; int? state = 0; bool? success = false; List? traces = []; Logistics(); factory Logistics.fromJson(Map json) => _$LogisticsFromJson(json); Map toJson() => _$LogisticsToJson(this); } @JsonSerializable(explicitToJson: true) class Traces { String? acceptStation = ''; String? acceptTime = ''; Traces(); factory Traces.fromJson(Map json) => _$TracesFromJson(json); Map toJson() => _$TracesToJson(this); }