-
Notifications
You must be signed in to change notification settings - Fork 30.3k
InteractiveViewer doesn't re-scroll child into view when child shrinks #83628
Copy link
Copy link
Open
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 2.2Found to occur in 2.2Found to occur in 2.2found in release: 2.3Found to occur in 2.3Found to occur in 2.3frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 2.2Found to occur in 2.2Found to occur in 2.2found in release: 2.3Found to occur in 2.3Found to occur in 2.3frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
If the child of an InteractiveViewer becomes smaller, it should change the scroll position(s), if necessary, so that the child is visible. It doesn't.
To reproduce with the attached code:
Size window to something smaller than 1000x1000 (e.g. on desktop)
Check checkbox (making child big)
Scroll child so lower-right corner is visible
Uncheck checkbox
Now the child is completely invisible, and can't be scrolled back into view.
This behavior was observed on the MacOS runtime.
flutter doctor
/// Flutter code sample for InteractiveViewer
// This example shows a simple Container that can be panned
// container size set via checkbox
minimal code sample