UserInfo.fromMap constructor

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

Implementation

factory UserInfo.fromMap(Map<String, dynamic> map) => UserInfo(
      id: (map['id'] as num?)?.toInt() ?? 0,
      userId: map['userID'] as String? ?? '',
      username: map['username'] as String? ?? '',
      businessUnitId: map['businessUnitID'] as String? ?? '',
      keyHash: map['keyHash'] as String? ?? '',
      status: map['status'] as bool? ?? false,
      deleted: map['deleted'] as bool? ?? false,
      role: map['role'] as String? ?? '',
      createdAt: (map['createdAt'] as num?)?.toInt() ?? 0,
      updatedAt: (map['updatedAt'] as num?)?.toInt(),
    );