Message constructor

Message(
  1. String? from,
  2. String? text, {
  3. int? time,
  4. int? readTimeSeconds,
})

Implementation

Message(this.from, this.text, {this.time, this.readTimeSeconds}) {
  this.time = DateTime.now().millisecondsSinceEpoch;
  if (this.readTimeSeconds == null) this.readTimeSeconds = getTotalReadTime();
  this.text = "<p style='text-align: justify;'>${this.text}</p>";
}