Skip to content

ListView Sliding abnormal flashing #110340

@au-top

Description

@au-top

Steps to Reproduce

  1. Execute flutter run on the code sample
  2. Slide up from the bottom

Expected results: normal upward

Actual results: slide up from 19 and flash (bounce back) to 18

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

void main() {
  runApp(const MyWidget());
}

class MyWidget extends StatefulWidget {
  const MyWidget({super.key});

  @override
  State<StatefulWidget> createState() => MyWidgetState();
}

class MyWidgetState extends State<StatefulWidget> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: ListView.builder(
          itemBuilder: (context, index) {
            return Container(
              height: index * 30,
              color: Colors.primaries[index % Colors.primaries.length],
              child: Center(
                child: Text(
                  index.toString(),
                  style: const TextStyle(fontSize: 40),
                ),
              ),
            );
          },
          itemCount: 20,
        ),
      ),
    );
  }
}
Logs

Null

flutter doctor -v logs

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel master, 3.1.0-0.0.pre.2486, on Microsoft Windows [版本 10.0.22000.856], locale zh-CN)
    • Flutter version 3.1.0-0.0.pre.2486 on channel master at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f477c8b184 (20 hours ago), 2022-08-25 10:28:08 -0700
    • Engine revision bd7a1e0b2b
    • Dart version 2.19.0 (build 2.19.0-138.0.dev)
    • DevTools version 2.16.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at D:\AndroidSDK
    • Platform android-33, build-tools 32.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.6)
    • Visual Studio at D:\VSSDK\IDE
    • Visual Studio Community 2022 version 17.1.32421.90
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\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 11.0.12+7-b1504.28-7817840)

[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.1
    • 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

[√] VS Code (version 1.70.2)
    • VS Code at C:\Users\autop\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.46.0

[√] VS Code (version 1.71.0-insider)
    • VS Code at C:\Users\autop\AppData\Local\Programs\Microsoft VS Code Insiders
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (5 available)
    • DBY W09 (mobile)  • DXQBB21C02222514   • android-arm64  • Android 10 (API 29)
    • DBY W09 (mobile)  • 192.168.8.208:5555 • android-arm64  • Android 10 (API 29)
    • Windows (desktop) • windows            • windows-x64    • Microsoft Windows [版本 10.0.22000.856]
    • Chrome (web)      • chrome             • web-javascript • Google Chrome 104.0.5112.102
    • Edge (web)        • edge               • web-javascript • Microsoft Edge 104.0.1293.54

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

• No issues found!

d9a562125f75718cdc0d66c9ca2e9dc3.mp4

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: regressionIt was better in the past than it is nowc: renderingUI glitches reported at the engine/skia or impeller rendering levelf: scrollingViewports, list views, slivers, etc.found in release: 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onwaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions