TransientMessage.fromMap constructor

TransientMessage.fromMap(
  1. dynamic map
)

Creates a new TransientMessage instance from a map.

Implementation

factory TransientMessage.fromMap(dynamic map) {
  return TransientMessage(
    receiverId: map['receiverId'],
    receiverType: map['receiverType'],
    data: Map<String, dynamic>.from(map['data'] ?? '{}'),
    sender: map['sender'] == null ? null : User.fromMap(map['sender']),
  );
}