ContactPhone.fromJson constructor

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

Creates a phone from a JSON map

Implementation

factory ContactPhone.fromJson(Map<String, dynamic> json) {
  return ContactPhone(
    number: (json['number'] as String?) ?? '',
    label: _stringToLabel(json['label'] as String?),
    customLabel: (json['customLabel'] as String?) ?? '',
    isPrimary: (json['isPrimary'] as bool?) ?? false,
  );
}