create static method
Implementation
static List<Preset> create(List<PresetInfo> infos, List<Zone> zones, List<Instrument> instruments)
{
if (infos.length <= 1)
{
throw "No valid preset was found.";
}
// The last one is the terminator.
int count = infos.length - 1;
List<Preset> presets = [];
for (var i = 0; i < count; i++)
{
presets.add(Preset.fromInfo(
infos[i], zones, instruments
));
}
return presets;
}