feat: new design
This commit is contained in:
parent
9a244a7302
commit
1d7d8dcae0
19 changed files with 3428 additions and 696 deletions
19
lib/utils/status.dart
Normal file
19
lib/utils/status.dart
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
class Status {
|
||||
static const String namespace = 'im.fluffychat.statuses';
|
||||
final String senderId;
|
||||
final String message;
|
||||
final DateTime dateTime;
|
||||
|
||||
Status(this.senderId, this.message, this.dateTime);
|
||||
|
||||
Status.fromJson(Map<String, dynamic> json)
|
||||
: senderId = json['sender_id'],
|
||||
message = json['message'],
|
||||
dateTime = DateTime.fromMillisecondsSinceEpoch(json['date_time']);
|
||||
|
||||
Map<String, dynamic> toJson() => <String, dynamic>{
|
||||
'sender_id': senderId,
|
||||
'message': message,
|
||||
'date_time': dateTime.millisecondsSinceEpoch,
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue