refreshSceneMode method
Re-read the lifecycle now instead of waiting for the next poll tick, so a read right after a native dialog closes does not report a stale mode.
Implementation
Future<void> refreshSceneMode() async {
if (deviceMode) {
nativeSurfaceName = await nativeReader?.foreignSurface();
return;
}
await _pollLifecycle();
}