add dart client to packages

This commit is contained in:
Neevash Ramdial
2021-01-07 12:09:26 -04:00
parent e7eb0a27f6
commit f28cc91301
160 changed files with 26368 additions and 0 deletions
@@ -0,0 +1,31 @@
import 'package:json_annotation/json_annotation.dart';
import 'user.dart';
part 'read.g.dart';
/// The class that defines a read event
@JsonSerializable()
class Read {
/// Date of the read event
final DateTime lastRead;
/// User who sent the event
final User user;
/// Number of unread messages
final int unreadMessages;
/// Constructor used for json serialization
Read({
this.lastRead,
this.user,
this.unreadMessages,
});
/// Create a new instance from a json
factory Read.fromJson(Map<String, dynamic> json) => _$ReadFromJson(json);
/// Serialize to json
Map<String, dynamic> toJson() => _$ReadToJson(this);
}