fff
3 days ago
11 changed files with 141 additions and 49 deletions
@ -0,0 +1,29 @@ |
|||||||
|
import 'package:json_annotation/json_annotation.dart'; |
||||||
|
|
||||||
|
part 'mip_data.g.dart'; |
||||||
|
|
||||||
|
@JsonSerializable(explicitToJson: true) |
||||||
|
class MIpData { |
||||||
|
String? ret; |
||||||
|
Mip? data; |
||||||
|
|
||||||
|
MIpData(); |
||||||
|
|
||||||
|
factory MIpData.fromJson(Map<String, dynamic> json) => _$MIpDataFromJson(json); |
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => _$MIpDataToJson(this); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@JsonSerializable(explicitToJson: true) |
||||||
|
class Mip { |
||||||
|
String? ip; |
||||||
|
List<String>? location; |
||||||
|
|
||||||
|
|
||||||
|
Mip({this.ip, this.location}); |
||||||
|
|
||||||
|
factory Mip.fromJson(Map<String, dynamic> json) => _$MipFromJson(json); |
||||||
|
Map<String, dynamic> toJson() => _$MipToJson(this); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND |
||||||
|
|
||||||
|
part of 'mip_data.dart'; |
||||||
|
|
||||||
|
// ************************************************************************** |
||||||
|
// JsonSerializableGenerator |
||||||
|
// ************************************************************************** |
||||||
|
|
||||||
|
MIpData _$MIpDataFromJson(Map<String, dynamic> json) => MIpData() |
||||||
|
..ret = json['ret'] as String? |
||||||
|
..data = json['data'] == null |
||||||
|
? null |
||||||
|
: Mip.fromJson(json['data'] as Map<String, dynamic>); |
||||||
|
|
||||||
|
Map<String, dynamic> _$MIpDataToJson(MIpData instance) => <String, dynamic>{ |
||||||
|
'ret': instance.ret, |
||||||
|
'data': instance.data?.toJson(), |
||||||
|
}; |
||||||
|
|
||||||
|
Mip _$MipFromJson(Map<String, dynamic> json) => Mip( |
||||||
|
ip: json['ip'] as String?, |
||||||
|
location: (json['location'] as List<dynamic>?) |
||||||
|
?.map((e) => e as String) |
||||||
|
.toList(), |
||||||
|
); |
||||||
|
|
||||||
|
Map<String, dynamic> _$MipToJson(Mip instance) => <String, dynamic>{ |
||||||
|
'ip': instance.ip, |
||||||
|
'location': instance.location, |
||||||
|
}; |
Loading…
Reference in new issue