mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
When a view gets disposed of, its rasterizer completely clears up the singleton `PlatformViewManager`. Particularly, it removes all registered platform view factories. This is wrong because the remaining PlatformViews on the page cannot be re-rendered, and the default Platform View factories (used by `pointer_interceptor`, for example), disappear. This PR attempts to preserve the `dispose` logic of the canvaskit rasterizer, without using the `debugClear` method of the `PlatformViewManager` (which is supposedly test-only). ## Issues * Fixes https://github.com/flutter/flutter/issues/142094 ## Tests * Added unit-test * Deployed demo app: https://dit-maps-tests.web.app [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style