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