addPeripheral method
- @protected
- BlePeripheral device
inherited
Implementation
@protected
void addPeripheral(BlePeripheral device) {
final knownDeviceIndex = devices.indexWhere((d) => d.id == device.id);
if (knownDeviceIndex >= 0) {
devices[knownDeviceIndex] = device;
} else {
devices.add(device);
}
notifyState(state);
}