onSamplingEnd method
Called when a sampling window ends, before getMeasurement.
Implementation
@override
void onSamplingEnd() {
FlutterBluePlus.stopScan().catchError((Object error) {
_data = Error(message: 'Error stopping bluetooth scan - $error');
});
if (_data is Bluetooth) (_data as Bluetooth).endScan = DateTime.now();
}