GetProfileResponse.fromMap constructor

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

Implementation

factory GetProfileResponse.fromMap(Map<String, dynamic> map) {
  return GetProfileResponse(
    id: map['id'] is String
        ? int.parse(map['id'] as String)
        : map['id'] as int,
    email: map['email'] as String,
    firstName: map['firstName'] as String,
    lastName: map['lastName'] as String,
    name: map['name'] as String,
    username: map['username'] as String,
    sipAccount:
        SipAccount.fromMap(map['sip_account'] as Map<String, dynamic>),
  );
}