UserModel.fromJson constructor
UserModel.fromJson( - Map<String, dynamic> doc
)
Implementation
factory UserModel.fromJson(Map<String, dynamic> doc) {
return UserModel.withData(
type: doc['type'],
organizationId: doc['organizationId'],
organizationName: doc['organizationName'],
name: doc['name'],
email: doc['email'],
mobileNo: doc['mobileNo'],
uid: doc['uid'],
notificationToken: doc['notificationToken'],
delete: doc['delete'],
createdOn: doc['createdOn'],
createdBy: doc['createdBy'],
associations: doc['associations'] is String
? jsonDecode(doc['associations'])
: doc['associations'],
bulletin: doc['bulletin'] is String
? jsonDecode(doc['bulletin'])
: doc['bulletin'],
age: doc['age'],
autoModifiedTimeStamp: doc['autoModifiedTimeStamp'],
deviceId: doc['deviceId'],
deviceName: doc['deviceName'],
doctorId: doc['doctorId'],
amcLog: doc['amcLog'],
amcPayment: doc['amcPayment'],
amcStartDate: doc['amcStartDate'],
amcValidity: doc['amcValidity'],
appVersion: doc['appVersion'],
deviceCode: doc['deviceCode'],
isActive: doc['isActive'],
lastSeenTime: doc['lastSeenTime'],
modifiedAt: doc['modifiedAt'],
modifiedTimeStamp: doc['modifiedTimeStamp'],
noOfMother: doc['noOfMother'],
noOfTests: doc['noOfTests'],
sync: doc['sync'],
testAccount: doc['testAccount'],
weight: doc['weight'],
patientId: doc['patientId'],
platformId: doc['platformId'],
platformRegAt: doc['platformRegAt'],
);
}