SocialMedia.fromJson constructor

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

Implementation

factory SocialMedia.fromJson(Map<String, dynamic> json) => SocialMedia(
      (json['userName'] as String?) ?? '',
      label: _stringToSocialMediaLabel[json['label'] as String? ?? ''] ??
          SocialMediaLabel.other,
      customLabel: (json['customLabel'] as String?) ?? '',
    );