findSlot method
Implementation
SlotData? findSlot(String slotName) {
if (slotName.isEmpty) throw ArgumentError('slotName cannot be empty.');
final List<SlotData> slots = this.slots;
final int n = slots.length;
for (int i = 0; i < n; i++) {
if (slots[i].name == slotName) return slots[i];
}
return null;
}