close method
Implementation
@override
Future<bool> close() async {
try {
final activeDevice = _activeDevice;
if (activeDevice != null) {
await activeDevice.device.close();
_activeDevice = null;
_foundDevices.clear();
return true;
}
return false;
} catch (e) {
debugPrint('Error in close: $e');
return false;
}
}