User.fromMap constructor

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

Implementation

factory User.fromMap(Map<String, dynamic> map) {
  return User(
    $id: map['\$id'].toString(),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
    name: map['name'].toString(),
    password: map['password']?.toString(),
    hash: map['hash']?.toString(),
    hashOptions: map['hashOptions'],
    registration: map['registration'].toString(),
    status: map['status'],
    labels: map['labels'],
    passwordUpdate: map['passwordUpdate'].toString(),
    email: map['email'].toString(),
    phone: map['phone'].toString(),
    emailVerification: map['emailVerification'],
    phoneVerification: map['phoneVerification'],
    prefs: Preferences.fromMap(map['prefs']),
    accessedAt: map['accessedAt'].toString(),
  );
}