getProfileMainFeature static method

String getProfileMainFeature(
  1. AppProfile profile
)

Implementation

static String getProfileMainFeature(AppProfile profile) {

  String profileMainFeature = "";

  switch(profile.type) {
    case(ProfileType.appArtist):
      profileMainFeature = getMainInstrument(profile.instruments ?? <String, Instrument>{});
      break;
    case(ProfileType.facilitator):
      profileMainFeature = getMainFacility(profile.facilities ?? <String, Facility>{});
      break;
    case(ProfileType.host):
      profileMainFeature = getMainPlace(profile.places ?? <String, Place>{});
      break;
    default:
      profileMainFeature = CoreUtilities.getMainGenre(profile.genres ?? <String, Genre>{});
      break;
  }


  return profileMainFeature.isNotEmpty ? profileMainFeature : profile.type.value;
}