15 lines
349 B
Dart
15 lines
349 B
Dart
|
|
class Message {
|
||
|
|
String receiverName;
|
||
|
|
String message;
|
||
|
|
DateTime date;
|
||
|
|
String senderName;
|
||
|
|
bool isMe;
|
||
|
|
Message({this.receiverName, this.message, this.date, this.senderName,this.isMe});
|
||
|
|
bool fromToday() {
|
||
|
|
var now = DateTime.now();
|
||
|
|
return date.day == now.day &&
|
||
|
|
date.month == now.month &&
|
||
|
|
date.year == now.year;
|
||
|
|
}
|
||
|
|
}
|