mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
While testing with a different add-to-app https://github.com/flutter/samples/pull/2787, an exception is sometimes thrown when the resize is attempted because the callback comes from a different thread. It is expected that the raster thread calls this but with previous [testing](https://github.com/mboetger/test-add-to-app/tree/content-sizing) never caused this exception. This PR ensures the resize happens on the UI thread. It also a flag to ensure content sizing is disabled. Fixes: https://github.com/flutter/flutter/issues/181573 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.