Skip to content

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Aug 7, 2024

Description

This PR fixes PageController throwing when using jumpToPage or animateToPage to switch page before the viewport dimensions were retrieved.

Solution based on #152947 (comment).

Related Issue

Fixes #86222.
Fixes #152837

Tests

Adds 2 tests.

@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Aug 7, 2024
@bleroux bleroux force-pushed the fix_page_controller_throws_when_viewPortDimensions_are_not_set branch from 2d300ee to 49a9c32 Compare August 7, 2024 13:28
@bleroux bleroux requested review from Piinks, chunhtai and xu-baolin and removed request for xu-baolin August 7, 2024 14:26
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you so much for taking a look and sending a PR. This is the right solution, so elegant! ✨ 🎊 ✨

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 7, 2024
@Piinks Piinks added c: crash Stack traces logged to the console f: scrolling Viewports, list views, slivers, etc. labels Aug 7, 2024
@auto-submit auto-submit bot merged commit d595e98 into flutter:master Aug 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 7, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 7, 2024
flutter/flutter@0a7f8af...d595e98

2024-08-07 [email protected] Fix PageController throws when changing page before viewPortDimensions are set (flutter/flutter#153017)
2024-08-07 [email protected] Update design languages triage link to exclude drafts (flutter/flutter#153027)
2024-08-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[tool] Guard process writes to frontend server in `ResidentCompiler` (#152358)" (flutter/flutter#153028)
2024-08-07 [email protected] Roll Flutter Engine from 206e86ee8a40 to 5a0fd5fbecc6 (6 revisions) (flutter/flutter#152985)

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],[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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…s are set (flutter#153017)

## Description

This PR fixes `PageController` throwing when using `jumpToPage` or `animateToPage` to switch page before the viewport dimensions were retrieved.

Solution based on flutter#152947 (comment).

## Related Issue

Fixes flutter#86222.
Fixes flutter#152079

## Tests

Adds 2 tests.
@bleroux bleroux deleted the fix_page_controller_throws_when_viewPortDimensions_are_not_set branch August 7, 2024 22:11
DBowen33 pushed a commit to DBowen33/flutter that referenced this pull request Aug 16, 2024
…s are set (flutter#153017)

## Description

This PR fixes `PageController` throwing when using `jumpToPage` or `animateToPage` to switch page before the viewport dimensions were retrieved.

Solution based on flutter#152947 (comment).

## Related Issue

Fixes flutter#86222.
Fixes flutter#152079

## Tests

Adds 2 tests.
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…s are set (flutter#153017)

## Description

This PR fixes `PageController` throwing when using `jumpToPage` or `animateToPage` to switch page before the viewport dimensions were retrieved.

Solution based on flutter#152947 (comment).

## Related Issue

Fixes flutter#86222.
Fixes flutter#152079

## Tests

Adds 2 tests.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
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 c: crash Stack traces logged to the console f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TabBar throws an error on back navigation when used together with initialRoute TabBarView crashes when switching index before layout

3 participants