ChatMessage class Null safety Models

채팅메시지

Annotations

Constructors

ChatMessage({required int id, required int roomId, required User user, required String message, required DateTime dateTime})
ChatMessage.fromJson(Map<String, dynamic> json)
factory

Properties

dateTime DateTime
@JsonKey(name: 'dateTime', fromJson: _dateTimeFromJson, toJson: _dateTimeToJson), final
hashCode int
The hash code for this object. [...]
read-only, inherited
id int
@JsonKey(name: 'id'), final
message String
@JsonKey(name: 'message'), final
roomId int
@JsonKey(name: 'roomId'), final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
user User
@JsonKey(name: 'user'), final

Methods

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

Operators

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