I have an application that connects to to Bluetooth device. I used the code from the following example:
Creating an App for Interacting with IoT Devices using BLE and FlutterFlow
I had the scan working, and then went to work on other portion of the app display the data. When I went back to complete the connection the app crashes.
final flutterBlue = FlutterBluePlus.instance;
I traced the cause down to the following code:
await flutterBlue.startScan( timeout: const Duration(seconds: 5), );