Message.fromMap constructor
Implementation
factory Message.fromMap(Map<String, dynamic> map) {
return Message(
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
providerType: map['providerType'].toString(),
topics: map['topics'] ?? [],
users: map['users'] ?? [],
targets: map['targets'] ?? [],
scheduledAt: map['scheduledAt']?.toString(),
deliveredAt: map['deliveredAt']?.toString(),
deliveryErrors: map['deliveryErrors'],
deliveredTotal: map['deliveredTotal'],
data: map['data'],
status: map['status'].toString(),
);
}