Topic.fromMap constructor

Topic.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Topic.fromMap(Map<String, dynamic> map) {
  return Topic(
    $id: map['\$id'].toString(),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
    name: map['name'].toString(),
    emailTotal: map['emailTotal'],
    smsTotal: map['smsTotal'],
    pushTotal: map['pushTotal'],
    subscribe: map['subscribe'] ?? [],
  );
}