parseSocialType function

SocialType parseSocialType(
  1. String socialTitle
)

It retrieves the social type in base of the current host domain

Implementation

SocialType parseSocialType(String socialTitle) {
  if (socialTitle.contains("twitter")) {
    return SocialType.twitter;
  } else if (socialTitle.contains("linkedin")) {
    return SocialType.linkedin;
  } else if (socialTitle.contains("instagram")) {
    return SocialType.instagram;
  } else if (socialTitle.contains("facebook")) {
    return SocialType.facebook;
  } else if (socialTitle.contains("github")) {
    return SocialType.github;
  } else if (socialTitle.contains("pinterest")) {
    return SocialType.pinterest;
  } else if (socialTitle.contains("reddit")) {
    return SocialType.reddit;
  } else if (socialTitle.contains("google")) {
    return SocialType.google;
  } else if (socialTitle.contains("microsoft")) {
    return SocialType.microsoft;
  } else {
    return SocialType.other;
  }
}