MediaQuery as InheritedModel¶
Did you know?
When you call MediaQuery.of(context)
inside a build method, the widget will rebuild when any of the MediaQuery
properties change.
But there’s a better way that lets you depend only on the properties you care about (and minimize unnecessary rebuilds). 👇
More info on this PR, which was merged and made it to the Flutter 3.10 stable release:
Previous | Next |
---|---|
Happy Birthday with records in Dart 3 | Record Equality in Dart 3 |
Last update:
18 septembre 2023
Created: 18 septembre 2023
Created: 18 septembre 2023