getBandInstrumentMatches static method
Implementation
static List<Instrument> getBandInstrumentMatches(Band band, Map<String,Instrument> profileInstruments) {
List<Instrument> bandInstrumentMatches = [];
try {
for (var bandMember in band.members!.values) {
if(profileInstruments.containsKey(bandMember.instrument!.id)
&& bandMember.profileId.isEmpty) {
bandInstrumentMatches.add(profileInstruments[bandMember.instrument!.id] ?? Instrument());
}
}
} catch (e) {
AppConfig.logger.e(e.toString());
}
return bandInstrumentMatches;
}