toJson method Null safety

Map<String, dynamic> toJson()

Retrurn Map presentation of the Message

Implementation

Map<String, dynamic> toJson() => {'user': user, 'msg': msg};