AppProfile.fromProfileInstruments constructor

AppProfile.fromProfileInstruments(
  1. dynamic data
)

Implementation

AppProfile.fromProfileInstruments(data) :
      id = data["id"] ?? "",
      name = data["name"] ?? "",
      photoUrl = data["photoUrl"] ?? "",
      usageReason = EnumToString.fromString(UsageReason.values, data["usageReason"] ?? UsageReason.casual.name) ?? UsageReason.casual,
      aboutMe = data["aboutMe"] ?? "",
      mainFeature = data["mainFeature"] ?? "",
      position = data["position"] is Map<dynamic,dynamic> ? Position.fromMap(data["position"]) : null,
      address = data["address"] ?? '',
      phoneNumber = data["phoneNumber"] ?? '',
      favoriteItems = data["favoriteItems"]?.cast<String>() ?? [],
      chamberPresets = data["chamberPresets"]?.cast<String>() ?? [],
      instruments = { for (var e in data["instruments"]?.cast<String>() ?? []) e : Instrument() },
      frequencies = { for (var e in data["frequencies"]?.cast<String>() ?? []) e : NeomFrequency() },
      type = ProfileType.appArtist,
      coverImgUrl = "",
      isActive = true,
      showInDirectory = false,
      verificationLevel = EnumToString.fromString(VerificationLevel.values, data["verificationLevel"] ?? VerificationLevel.none.name) ?? VerificationLevel.none;