Skip to content

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Aug 28, 2023

The ui.Display is a simple data class (like MediaQueryData), and does not get updated when the display size changes. The provided sample code does not work as intended, but the update does.

The `ui.Display` is a simple data class (like `ViewportMetrics`), and does not get updated when the display size changes.  The provided sample code does not work as intended, but the update does.
@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Aug 28, 2023
/// @override
/// void didChangeMetrics() {
/// final ui.Display? display = _display;
/// final ui.Display? display = _view?.display;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you cached the display property here, you won't actaully get the new size values of the display - you'll get the size values of whatever the display was when you cached it.

Copy link
Contributor

@Hixie Hixie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 28, 2023
@dnfield dnfield changed the base branch from main to master August 29, 2023 05:55
@auto-submit auto-submit bot merged commit f489256 into master Aug 29, 2023
@auto-submit auto-submit bot deleted the dnfield-patch-1 branch August 29, 2023 06:29
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 29, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 29, 2023
flutter/flutter@ec387a4...6c95737

2023-08-29 [email protected] Roll Flutter Engine from d84763e04496 to 65438c7bb46a (1 revision) (flutter/flutter#133563)
2023-08-29 [email protected] Roll Flutter Engine from 0625049b5ee3 to d84763e04496 (6 revisions) (flutter/flutter#133559)
2023-08-29 [email protected] Roll Flutter Engine from c2ec683c4ea8 to 0625049b5ee3 (2 revisions) (flutter/flutter#133538)
2023-08-29 [email protected] Roll Flutter Engine from 3d1faae1bc2f to c2ec683c4ea8 (4 revisions) (flutter/flutter#133535)
2023-08-29 [email protected] Roll Flutter Engine from c7c61ff9732c to 3d1faae1bc2f (1 revision) (flutter/flutter#133530)
2023-08-29 [email protected] Fix bug in setPreferredOrientations example (flutter/flutter#133503)
2023-08-29 [email protected] Roll Flutter Engine from 9778c2cb1d51 to c7c61ff9732c (2 revisions) (flutter/flutter#133527)
2023-08-29 [email protected] Roll Flutter Engine from ffda7e3cfc7f to 9778c2cb1d51 (1 revision) (flutter/flutter#133526)
2023-08-29 [email protected] Roll Flutter Engine from 1e821961e96a to ffda7e3cfc7f (2 revisions) (flutter/flutter#133523)
2023-08-29 [email protected] Roll Flutter Engine from 45e2b41e5ae5 to 1e821961e96a (2 revisions) (flutter/flutter#133520)
2023-08-29 [email protected] Roll Flutter Engine from bd2132a0814f to 45e2b41e5ae5 (2 revisions) (flutter/flutter#133518)
2023-08-29 [email protected] add missing forwards of local-engine-host in benchmark runners (flutter/flutter#133517)
2023-08-28 [email protected] Roll Flutter Engine from a7a4c1c70bad to bd2132a0814f (3 revisions) (flutter/flutter#133516)
2023-08-28 [email protected] FocusNode and FocusManager should dispatch creation in constructor. (flutter/flutter#133490)
2023-08-28 [email protected] Use flutter pub get instead of dart pub get in create_api_docs.dart (flutter/flutter#133493)
2023-08-28 [email protected] PlatformRouteInformationProvider should dispatch creation in constructor. (flutter/flutter#133492)
2023-08-28 [email protected] Roll Flutter Engine from 91522a188bda to a7a4c1c70bad (11 revisions) (flutter/flutter#133508)
2023-08-28 [email protected] Revert "Remove `ImageProvider.load`, `DecoderCallback` and `PaintingBâ�¦ (flutter/flutter#133482)
2023-08-28 [email protected] Fix context menu button color on Android when textButtonTheme is set (flutter/flutter#133271)
2023-08-28 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.21.4 to 2.21.5 (flutter/flutter#133504)
2023-08-28 [email protected] Fix  `DatePickerDialog` & `DateRangePickerDialog` overflow when resized from landscape to portrait (flutter/flutter#133327)
2023-08-28 [email protected] Empty commit to re-trigger tests (flutter/flutter#133495)
2023-08-28 [email protected] Revert "PlatformRouteInformationProvider  should dispatch creation in constructor." (flutter/flutter#133479)
2023-08-28 [email protected] Revert "FocusNode and FocusManager should dispatch creation in constructor." (flutter/flutter#133474)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants