MessageModel class

Constructors

MessageModel({int? id, required OwnerType ownerType, String? ownerName, String? avatar, required String content, required int createdAt})
MessageModel.fromJson(Map<String, dynamic> json)
factory

Properties

avatar String?
avatar url
final
content String
The content to be displayed as a message.
final
createdAt int
Provides message created time,milliseconds since.
final
hashCode int
The hash code for this object.
no setterinherited
id int?
Provides id
final
key GlobalKey<State<StatefulWidget>>
Avoid rebuilding the message widget when new incoming messages refresh the list.
final
ownerName String?
Name to be displayed with the initials. egg.: Higor Lapa will be H
final
ownerType OwnerType
Controls who is sending or receiving a message. Used to handle in which side of the screen the message will be displayed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showCreatedTime bool
Whether to display the creation time.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited