Repository navigation
Clip.none ignored during overscroll on Android #133330
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.14Found to occur in 3.14Found to occur in 3.14frameworkflutter/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 onplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- Create a scrollable view that's larger than the screen bounds
- Give the view some padding on the scroll direction
- Configure the scrollable to use
clipBehavior: Clip.none - 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 logsFlutter 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.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.14Found to occur in 3.14Found to occur in 3.14frameworkflutter/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 onplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Activity
huycozy commentedon Aug 28, 2023
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
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![-]Clipping.none ignored during overscroll on Android [/-][+]`Clip.none` ignored during overscroll on Android [/+]Piinks commentedon Aug 30, 2023
Looks related to #133445
Piinks commentedon Aug 30, 2023
@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.
Piinks commentedon Aug 30, 2023
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.
Fix clipBehavior ignored in Scrollable of SingleChildScrollView (#133696
huycozy commentedon Sep 6, 2023
Oh, that's right. Thanks for clarifying this!
github-actions commentedon Sep 20, 2023
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 -vand a minimal reproduction of the issue.