Membership.fromMap constructor

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

Implementation

factory Membership.fromMap(Map<String, dynamic> map) {
  return Membership(
    $id: map['\$id'].toString(),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
    userId: map['userId'].toString(),
    userName: map['userName'].toString(),
    userEmail: map['userEmail'].toString(),
    teamId: map['teamId'].toString(),
    teamName: map['teamName'].toString(),
    invited: map['invited'].toString(),
    joined: map['joined'].toString(),
    confirm: map['confirm'],
    roles: map['roles'] ?? [],
  );
}