flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
161.86k stars 26.57k forks source link

ListWheelScrollView: whole app starts flickering #145937

Closed BenjaminZaiser closed 9 hours ago

BenjaminZaiser commented 1 month ago

Steps to reproduce

Expected results

Everything is rendered correctly without any flickering

Actual results

Text shown in the app / app bar starts flickering and text also gets unreadable sometimes

Code sample

Code sample ```dart import 'package:flutter/material.dart'; void main() { runApp( MaterialApp( title: 'Flutter Demo', home: Scaffold( appBar: AppBar(title: const Text("Hello World")), body: SafeArea( child: Builder( builder: (context) => Column(children: [ Text("Hello World", style: Theme.of(context).textTheme.headlineLarge), Expanded( child: ListWheelScrollView( itemExtent: 50, offAxisFraction: 2, children: List.generate(5, (index) => Text("Item $index")), ), ), Text("Hello World", style: Theme.of(context).textTheme.headlineLarge), ]), ), ), ), ), ); } ```

Screenshots or Video

Screenshots / Video demonstration https://github.com/flutter/flutter/assets/4301810/4894e5a5-9843-40a2-a566-e7e10354edee

Logs

Logs ```console no logs available ```

Flutter Doctor output

Doctor output ```console [✓] Flutter (Channel stable, 3.19.5, on macOS 14.4 23E214 darwin-x64, locale en-GB) • Flutter version 3.19.5 on channel stable at /Users/username/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 300451adae (19 hours ago), 2024-03-27 21:54:07 -0500 • Engine revision e76c956498 • Dart version 3.3.3 • DevTools version 2.31.1 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/username/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.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.9+0-17.0.9b1087.7-11185874) [✓] VS Code (version 1.87.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [✓] Connected device (3 available) • iPhone Xs (mobile) • 46C2FCDC-4FE3-43E3-B33C-D01A89CAD840 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator) • macOS (desktop) • macos • darwin-x64 • macOS 14.4 23E214 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.86 [✓] Network resources • All expected network resources are available. • No issues found! ```
amir-hossein-rajaezadeh commented 1 month ago

What is your debug console log? please add logs

huycozy commented 1 month ago

Hi @BenjaminZaiser This seems to only appear on iOS simulator as I don't see it on iOS physical device. I'm quite inclined toward simulator rendering issue. Could you check this on a physical device if you have any?

KristijanZic commented 3 weeks ago

I can confirm the issue on the simulator when scrolling CupertinoPicker.

BenjaminZaiser commented 3 weeks ago

It happened on iPhone 15 Pro (a real device, iOS 17.2.1) once. After a restart, it somehow didn't occur anymore - really weird. Currently also happening on an iPad (real device).

huycozy commented 3 weeks ago

I checked this on two physical devices iPhone 7, iOS 15.8 and iPad Air 5 (iPadOS 17.2) but still couldn't reproduce it.

After a restart, it somehow didn't occur anymore

@BenjaminZaiser Does "restart" mean "hot restart"? The issue only occurs once since the app starts, right? Could you notice at the output console (on your IDE and also on XCode) to see if there is any warnings/errors?

I can confirm the issue on the simulator when scrolling CupertinoPicker.

It could be because CupertinoPicker uses ListWheelScrollView internally.

bqubique commented 2 weeks ago

Not sure if this is the issue I'm having currently where the icons flicker, and anything that has some Ink in it. 2024-04-12 10 22 09 am

Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 300451adae (2 weeks ago) • 2024-03-27 21:54:07 -0500
Engine • revision e76c956498
Tools • Dart 3.3.3 • DevTools 2.31.1
huycozy commented 2 weeks ago

@bqubique This issue is about ListWheelScrollView. Your issue seems unrelated to this. Please file another issue for better tracking. Thanks!

github-actions[bot] commented 9 hours ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.