resumeFromLifecycle method
Resumes scanning after pauseForLifecycle when the app returns.
Implementation
Future<void> resumeFromLifecycle() async {
if (!_lifecyclePaused || _userPaused) {
_lifecyclePaused = false;
return;
}
_lifecyclePaused = false;
await _awaitAppResumed();
if (_userPaused) return;
_starting = true;
_notifyStateChanged();
try {
await _startHardware();
} finally {
_starting = false;
_notifyStateChanged();
}
}