Phone.fromJson constructor

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

Implementation

factory Phone.fromJson(Map<String, dynamic> json) => Phone(
      (json['number'] as String?) ?? '',
      normalizedNumber: (json['normalizedNumber'] as String?) ?? '',
      label: _stringToPhoneLabel[json['label'] as String? ?? ''] ??
          PhoneLabel.mobile,
      customLabel: (json['customLabel'] as String?) ?? '',
      isPrimary: (json['isPrimary'] as bool?) ?? false,
    );