Skip to content

GridView.count with BouncingScrollPhysics and shrinkWrap = true only bounces in one direction #51078

@feinstein

Description

@feinstein

I have a GridView.count with BouncingScrollPhysics, in the direction where the items are being created it works fine, it bounces, but when I scroll back to the top, it doesn't bounce, it hits a wall. This is my GridView:

GridView.count(
  crossAxisCount: 3,
  physics: BouncingScrollPhysics(),
  padding: EdgeInsets.all(16),
  crossAxisSpacing: 16,
  mainAxisSpacing: 16,
  children: children,
  shrinkWrap: true,
);

A reproducible code can be found in #51077, shrinkWrap: true appears to be the problem, if I set both to false it bounces in both directions, but then I get the error reported at #51077.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: animationAnimation APIsf: scrollingViewports, list views, slivers, etc.found in release: 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions