Email.fromJson constructor

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

Implementation

factory Email.fromJson(Map<String, dynamic> json) => Email(
      (json['address'] as String?) ?? '',
      label: _stringToEmailLabel[json['label'] as String? ?? ''] ??
          EmailLabel.home,
      customLabel: (json['customLabel'] as String?) ?? '',
      isPrimary: (json['isPrimary'] as bool?) ?? false,
    );