Skip to content

BouncingScrollPhysics breaks further scrolling after content was scrolled off viewport #131479

@mozochek

Description

@mozochek

Is there an existing issue for this?

Steps to reproduce

  1. Run code sample
  2. Scroll content off the screen in any direction as in video
  3. Release fingers of screen

Expected results

After releasing fingers ListView's content should return back to top of the screen and scrolling should keep applying physics.

Actual results

After releasing fingers ListView's content stays out of the screen in it's position and not jumped back to top of the screen. Also further scrolling stopped applying physics.

Code sample

Code sample
import 'package:flutter/material.dart';

class HomeScreen extends StatelessWidget {
  const HomeScreen({
    super.key,
  });

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('AppBar'),
      ),
      body: SafeArea(
        child: ListView.builder(
          physics: const BouncingScrollPhysics(),
          itemCount: 100,
          itemBuilder: (_, index) {
            return ListTile(
              title: Text('Element $index'),
            );
          },
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
New.project.mp4

Logs

No response

Flutter Doctor output

Doctor output
[!] Flutter (Channel unknown, 3.10.5, on Microsoft Windows [Version 10.0.19045.3208], locale ru-RU)
    ! Flutter version 3.10.5 on channel unknown at Y:\SDKs\flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at
      https://flutter.dev/docs/get-started/install.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    • Framework revision 796c8ef792 (6 weeks ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at Y:\SDKs\Android
    • Platform android-33-ext5, build-tools 33.0.2
    • ANDROID_HOME = Y:\SDKs\Android
    • Java binary at: Y:\Programs\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
    • Visual Studio at O:\Programs\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.2.32630.192
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.2)
    • Android Studio at Y:\Programs\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)

[√] IntelliJ IDEA Community Edition (version 2023.1)
    • IntelliJ at Y:\Programs\IntelliJ IDEA
    • Flutter plugin version 74.0.4
    • Dart plugin version 231.9392.3

[√] Connected device (2 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.3208]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 115.0.1901.183
    ! Device 192.168.0.194:5555 is offline.

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions