-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flutter_adaptive_scaffold] use
MediaQuery.sizeOf
instead of `Media…
…Query.of` to prevent unnecessary rebuilds (#6544) the `isActive` method uses `MediaQuery.of(context).size.width`, which triggers widget rebuilds whenever a property of `MediaQuery` changes, even when the size.width doesn't change. instead, we should be using `MediaQuery.sizeOf(context).width`. fixes: flutter/flutter#146801
- Loading branch information
1 parent
af6fae4
commit ebd138d
Showing
4 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters