50 lines
919 B
Dart
50 lines
919 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'pic_message.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class PicMessage {
|
|
late PicData pic;
|
|
|
|
late PicMessagePos pos;
|
|
|
|
PicMessage();
|
|
|
|
factory PicMessage.fromJson(Map<String, dynamic> json) => _$PicMessageFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$PicMessageToJson(this);
|
|
}
|
|
|
|
@JsonSerializable()
|
|
class PicData
|
|
{
|
|
@JsonKey(name: "tr_id")
|
|
late int trId;
|
|
|
|
late int num;
|
|
|
|
late int time;
|
|
|
|
late String data;
|
|
|
|
PicData();
|
|
|
|
factory PicData.fromJson(Map<String, dynamic> json) => _$PicDataFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$PicDataToJson(this);
|
|
}
|
|
|
|
@JsonSerializable()
|
|
class PicMessagePos {
|
|
late double lat;
|
|
|
|
late double long;
|
|
|
|
late int acc = 0;
|
|
|
|
PicMessagePos();
|
|
|
|
factory PicMessagePos.fromJson(Map<String, dynamic> json) => _$PicMessagePosFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$PicMessagePosToJson(this);
|
|
} |