Diagnostic step 1
Capture detailed logcat including Flutter engine logs and SurfaceControl messages during a reproduce; include timestamps and stack traces for surface creation/destruction events and redact sensitive tokens.
Generated Oct 3, 2026, 12:35:03 AM
Capture detailed logcat including Flutter engine logs and SurfaceControl messages during a reproduce; include timestamps and stack traces for surface creation/destruction events and redact sensitive tokens.
Implement a robust WidgetsBindingObserver.didChangeMetrics handler that forces a safe reinitialize of the PlatformView: stop the native view, call setState to remove it from the widget tree, schedule a delayed re-add after 100–250 ms to allow the system to recreate surfaces (test varying delays).
In the embedding (MainActivity), listen for onConfigurationChanged and forward events to the Flutter engine; ensure FlutterActivity is using the v2 embedding and PlatformView lifecycle helpers.
Experiment in a staging build with additional sanity checks: onActivityPaused/onActivityResumed explicitly recreating the PlatformView and preserving user state externally (e.g., player position) to avoid data loss.
If reproducible after these app-level mitigations, gather minimized repro and Flutter engine version and file an issue against the Flutter engine and/or the OEM vendor if SurfaceControl/driver errors persist; escalate with device logs and exact reproduction steps.