Skip to content

Clip.none ignored during overscroll on Android  #133330

@cachapa

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.

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