simulateLifecycleState method
Manually trigger a lifecycle change for testing purposes.
Use this instead of didChangeAppLifecycleState in tests.
Implementation
@visibleForTesting
void simulateLifecycleState(AppLifecycleState state) {
_onLifecycleChanged(state);
}