InboxMessage.fromMap constructor
Creates an InboxMessage from a map received from native platform
Implementation
factory InboxMessage.fromMap(Map<String, dynamic> map) {
return InboxMessage(
queueId: map['queueId'] as String,
deliveryId: map['deliveryId'] as String?,
expiry: map['expiry'] != null
? DateTime.fromMillisecondsSinceEpoch((map['expiry'] as num).toInt())
: null,
sentAt:
DateTime.fromMillisecondsSinceEpoch((map['sentAt'] as num).toInt()),
topics: (map['topics'] as List<dynamic>?)?.cast<String>() ?? [],
type: map['type'] as String,
opened: map['opened'] as bool,
priority: map['priority'] as int?,
properties: (map['properties'] as Map<dynamic, dynamic>?)
?.cast<String, dynamic>() ??
{},
);
}