read method
Is called when a value has to be decoded.
Implementation
@override
ChatwootEventMessageUser read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return ChatwootEventMessageUser(
id: fields[1] as int?,
avatarUrl: fields[0] as String?,
name: fields[2] as String?,
thumbnail: fields[3] as String?,
);
}