Skip to content

[Android] Lists with AndroidOverscrollIndicator.stretch can be over scrolled infinitely with multi-touch #99264

@RitickSaha

Description

@RitickSaha

Steps to Reproduce:

  1. Use the Over-scroll behaviours on any scrollable widget.
    scrollBehavior: MaterialScrollBehavior( androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,),
  2. Start scrolling normally, this works perfectly
  3. Now, over scroll the view, hold the finger and use another finger to over scroll.

Expectation :

You will be able to over scroll infinitely and you UI will get stretched without limits.

Expected results:
My assumption is the stretch over-scroll should not be triggered if the stretch is already implemented.

Actual results:

This is an example of live app google Pay having this issue

Orignal UI After multiple continued over-scroll action

Hopefully everyone can face this problem.. this can also be a behaviour of specific OEMs,
So adding my device for ref: Samsung s10+

Sample Code:

/* main.dart */
void main() async {
runApp(Test());  
}

class TextScreen extends StatelessWidget {
  const TextScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: ListView.builder(
            itemBuilder: (context, index) => ListTile(
              title: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text(
                    index.toString(),
                  ),
                  Container(
                    height: 30,
                    width: 30,
                    decoration: BoxDecoration(
                      border: Border.all(
                        color: Colors.black,
                        width: 2,
                      ),
                      borderRadius: BorderRadius.all(
                        Radius.circular(25),
                      ),
                    ),
                  )
                ],
              ),
            ),
          ),
        ),
      ),
      scrollBehavior: MaterialScrollBehavior(
        androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,
      ),
    );
  }
}
Logs
[✓] Flutter (Channel stable, 2.10.2, on macOS 12.1 21C52 darwin-x64, locale en-IN)
  • Flutter version 2.10.2 at *****/development/flutter
  • Upstream repository https://github.com/flutter/flutter.git
  • Framework revision 097d3313d8 (9 days ago), 2022-02-18 19:33:08 -0600
  • Engine revision a83ed0e5e3
  • Dart version 2.16.1
  • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
  • Android SDK at *****Android/sdk
  • Platform android-31, build-tools 31.0.0
  • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
  • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
  • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
  • Xcode at /Applications/Xcode.app/Contents/Developer
  • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
  • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
  • Android Studio at /Applications/Android Studio.app/Contents
  • 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 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.64.2)
  • VS Code at /Applications/Visual Studio Code.app/Contents
  • Flutter extension version 3.34.0

[✓] Connected device (2 available)
  • **** (mobile) • O**NHQ****L9L • android-arm64  • Android 12 (API 31)
  • Chrome (web)     • chrome           • web-javascript • Google Chrome 98.0.4758.109

[✓] HTTP Host Availability
  • All required HTTP hosts are available

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressioncustomer: money (g3)f: material designflutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.found in release: 2.10Found to occur in 2.10found in release: 2.11Found to occur in 2.11frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyr: 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