UserData.fromJson constructor

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

Implementation

UserData.fromJson(Map<String, dynamic> json)
    : super(
        availabilityText: json['availabilityText'],
        custom: (json['custom'] != null
            ? Map<String, String?>.from(json['custom'])
            : null),
        email: (json['email'] != null
            ? (json['email'] is String
                ? <String>[json['email']]
                : List<String>.from(json['email']))
            : null),
        phone: (json['phone'] != null
            ? (json['phone'] is String
                ? <String>[json['phone']]
                : List<String>.from(json['phone']))
            : null),
        id: json['id'],
        name: json['name'],
        locale: json['locale'],
        photoUrl: json['photoUrl'],
        role: json['role'],
        welcomeMessage: json['welcomeMessage'],
      );