Skip to content

Clip.none ignored during overscroll on Android  #133330

Closed

Description

@cachapa

Is there an existing issue for this?

Steps to reproduce

  1. Create a scrollable view that's larger than the screen bounds
  2. Give the view some padding on the scroll direction
  3. Configure the scrollable to use clipBehavior: Clip.none
  4. Run it on Android, or simulate Android platform defaults

Expected results

The view should overscroll (stretch) normally.

Actual results

During the stretching overscroll effect, the bounds outside the scrollview disappear (are clipped) until the view is no longer being overscrolled.

Code sample

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

void main() {
  // Test this code in other platforms
  debugDefaultTargetPlatformOverride = TargetPlatform.android;
  runApp(const AppBarApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Padding(
          padding: const EdgeInsets.symmetric(vertical: 100),
          child: SingleChildScrollView(
            clipBehavior: Clip.none,
            child: Column(
              children:
                  List.generate(20, (i) => ListTile(title: Text('Item $i'))),
            ),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
Screencast.from.2023-08-25.16-38-34.webm

Logs

Logs
No relevant logs

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.14.0-9.0.pre.93, on Fedora Linux 38 (Workstation Edition) 6.4.11-200.fc38.x86_64, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Community Edition (version 2023.2)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 1 category.

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Aug 28, 2023
  2. huycozy commented on Aug 28, 2023

    @huycozy
    Member

    Thanks for filing the issue. I can see this on Android whilst it doesn't appear on iOS platform. Adding demo video with enabling Overlay guideline in Devtools Widget Inspector to see the issue more clearly.

    Also, the issue is only reproducible on master channel. On stable 3.13.1, the issue doesn't happen. Marking this as a regression issue.

    Demo
    master stable
    Record_2023-08-28-12-48-20.mp4
    Record_2023-08-28-13-03-19.mp4
    flutter doctor -v (stable and master)
    [✓] Flutter (Channel stable, 3.13.1, on macOS 13.5 22G74 darwin-x64, locale en-VN)
        • Flutter version 3.13.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision e1e47221e8 (23 hours ago), 2023-08-22 21:43:18 -0700
        • Engine revision b20183e040
        • Dart version 3.1.0
        • DevTools version 2.25.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-34, build-tools 32.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14E222b
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • 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 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.81.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.70.0
    
    [✓] Connected device (3 available)
        • iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.7.2 19H218
        • macOS (desktop) • macos                                    • darwin-x64     • macOS 13.5 22G74 darwin-x64
        • Chrome (web)    • chrome                                   • web-javascript • Google Chrome 116.0.5845.96
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    [!] Flutter (Channel master, 3.14.0-9.0.pre.115, on macOS 13.5 22G74 darwin-x64, locale en-VN)
        • Flutter version 3.14.0-9.0.pre.115 on channel master at /Users/huynq/Documents/GitHub/flutter_master
        ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 6d22a11b62 (3 hours ago), 2023-08-27 19:57:26 -0400
        • Engine revision 0593c0455f
        • Dart version 3.2.0 (build 3.2.0-97.0.dev)
        • DevTools version 2.26.2
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-34, build-tools 32.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14E222b
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • 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 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.81.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.70.0
    
    [✓] Connected device (3 available)
        • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
        • macOS (desktop)  • macos            • darwin-x64     • macOS 13.5 22G74 darwin-x64
        • Chrome (web)     • chrome           • web-javascript • Google Chrome 116.0.5845.110
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
  3. added
    platform-androidAndroid applications specifically
    frameworkflutter/packages/flutter repository. See also f: labels.
    f: scrollingViewports, list views, slivers, etc.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    c: regressionIt was better in the past than it is now
    and removed
    in triagePresently being triaged by the triage team
    on Aug 28, 2023
  4. changed the title [-]Clipping.none ignored during overscroll on Android [/-] [+]`Clip.none` ignored during overscroll on Android [/+] on Aug 28, 2023
  5. added
    P2Important issues not at the top of the work list
    on Aug 30, 2023
  6. Piinks commented on Aug 30, 2023

    @Piinks
    Contributor

    Looks related to #133445

  7. Piinks commented on Aug 30, 2023

    @Piinks
    Contributor

    @huycozy the examples in your videos are not the same. On stable it is using the GlowingOverscrollIndicator, not the StretchingOverscrollIndicator, which is the new default on the master channel.

  8. Piinks commented on Aug 30, 2023

    @Piinks
    Contributor

    This is caused by the SingleChildScrollView. Swapping it out for a ListView shows no issue. I am guessing the clipBehavior in SingleChildScrollView is not passed on to the Scrollable that then passes it on to the overscroll indicator. Looking at fixing this now.

  9. added
    workaround availableThere is a workaround available to overcome the issue
    and removed
    c: regressionIt was better in the past than it is now
    on Aug 30, 2023
  10. self-assigned this
    on Aug 30, 2023
  11. added
    r: fixedIssue is closed as already fixed in a newer version
    on Sep 6, 2023
  12. huycozy commented on Sep 6, 2023

    @huycozy
    Member

    the examples in your videos are not the same. On stable it is using the GlowingOverscrollIndicator, not the StretchingOverscrollIndicator, which is the new default on the master channel.

    Oh, that's right. Thanks for clarifying this!

  13. github-actions commented on Sep 20, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  14. locked as resolved and limited conversation to collaborators on Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: scrollingViewports, list views, slivers, etc.found in release: 3.14Found to occur in 3.14frameworkflutter/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 versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework teamworkaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions