User.fromJson constructor

User.fromJson(
  1. Map<String, dynamic> json
)

Constructs a User from a JSON map.

If a property is not present in the map, the corresponding property will be null.

Implementation

factory User.fromJson(Map<String, dynamic> json) {
  return User(
    businessPhones: json['businessPhones'] != null
        ? List<String>.from(json['businessPhones'])
        : null,
    displayName: json['displayName'],
    givenName: json['givenName'],
    jobTitle: json['jobTitle'],
    mail: json['mail'],
    mobilePhone: json['mobilePhone'],
    officeLocation: json['officeLocation'],
    preferredLanguage: json['preferredLanguage'],
    surname: json['surname'],
    userPrincipalName: json['userPrincipalName'],
    id: json['id'],
  );
}