2020-06-02 14:56:38 +06:30
|
|
|
class Message {
|
2020-09-20 05:34:49 +06:30
|
|
|
String id;
|
2020-06-02 14:56:38 +06:30
|
|
|
String receiverName;
|
|
|
|
|
String message;
|
|
|
|
|
DateTime date;
|
|
|
|
|
String senderName;
|
|
|
|
|
bool isMe;
|
2020-09-20 05:34:49 +06:30
|
|
|
|
|
|
|
|
Message(
|
|
|
|
|
{this.receiverName, this.message, this.date, this.senderName, this.isMe});
|
|
|
|
|
|
2020-06-02 14:56:38 +06:30
|
|
|
bool fromToday() {
|
|
|
|
|
var now = DateTime.now();
|
|
|
|
|
return date.day == now.day &&
|
|
|
|
|
date.month == now.month &&
|
|
|
|
|
date.year == now.year;
|
|
|
|
|
}
|
|
|
|
|
}
|