28 lines
614 B
Dart
28 lines
614 B
Dart
class LastMessage {
|
|
final String? text;
|
|
final String? audio;
|
|
final bool writedByAdmin;
|
|
final bool readed;
|
|
|
|
const LastMessage({
|
|
this.text,
|
|
this.audio,
|
|
required this.writedByAdmin,
|
|
required this.readed,
|
|
});
|
|
|
|
factory LastMessage.fromJson(Map<String, dynamic> json) => LastMessage(
|
|
text: json['text'],
|
|
audio: json['audio'],
|
|
writedByAdmin: json['writedByAdmin'],
|
|
readed: json['readed'],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'text': text,
|
|
'audio': audio,
|
|
'writedByAdmin': writedByAdmin,
|
|
'readed': readed,
|
|
};
|
|
}
|