You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should be able to subscribe to changes on properties of MediaQuery instead of all changes #102060
Since flutter-team-archive/engine#29281 during keyboard opening animation the root MediaQuery will be updated with each frame. There are a lot of widgets which might call MediaQuery.of(context) but not all depend on all of the MediaQuery properties. It would be more efficient to only rebuild those widgets which depend on the change in screen dimensions, but not the widgets which depend on the text scale factor, which presumably isn't changing with each frame.
We use MediaQuery a lot to access certain properties like (padding.bottom), but are having issues that keyboard animations are triggering unnecessary rebuilds on the pages in the navigator stack, and that causes jankyness. So having the ability to subscribe to certain changes only would be amazing for us.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
HansMuller commentedon Apr 18, 2022
InheritedModel enables dependency on just one "aspect" of an inherited widget. It might be possible to retrofit MediaQuery to be an InheritedModel.
moffatman commentedon Apr 18, 2022
@HansMuller See the linked PR #97928. I used InheritedModel and it noticeably improved performance during keyboard animation.
jseminck commentedon Sep 3, 2022
We use MediaQuery a lot to access certain properties like (
padding.bottom), but are having issues that keyboard animations are triggering unnecessary rebuilds on the pages in the navigator stack, and that causes jankyness. So having the ability to subscribe to certain changes only would be amazing for us.djhkfe3234 commentedon Oct 11, 2022
any update on this?
github-actions commentedon Mar 5, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.