Repository navigation
Description
Steps to reproduce
Hello,
I’m encountering severe glitches in the production application, as shown in the first video.
To better understand the issue, I attempted to create a minimal reproducible example in a clean project using scroll functionality, as demonstrated in the second video.
Additionally, I’ve noticed similar glitches occurring in modal popups, specifically with the Cupertino bottom sheet, as well as during Cupertino route navigation when the screen contains a scrollable view. I suspect the issue might be related to ScrollView and CustomScrollView at this views.
Any insights or potential solutions would be greatly appreciated.
P.S.
I saw issue #162499 just want to add that some glitches can happen during modal popup and during Navigation as you can see at first video
Code sample
Code sample
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.black87,
title: Text(widget.title),
),
body: CustomScrollView(
slivers: [ContentWidget()],
),
floatingActionButton: FloatingActionButton(
onPressed: () {
Navigator.push(
context,
CupertinoPageRoute(
settings: RouteSettings(),
builder: (context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.black12,
title: Text(widget.title),
),
body: CustomScrollView(
slivers: [ContentWidget()],
),
);
},
),
);
},
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
class ContentWidget extends StatelessWidget {
const ContentWidget({super.key, required});
@override
Widget build(BuildContext context) {
return SliverToBoxAdapter(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
for (int i = 0; i < 10; i++)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Container(
width: double.infinity,
height: 100,
color: Color.fromRGBO(
Random().nextInt(100) + (i * 10),
Random().nextInt(100) + (i * 10),
Random().nextInt(100) + (i * 10),
1,
),
child: Text(
DateTime.now().toString(),
style: Theme.of(context).textTheme.headlineMedium!.copyWith(
color: Colors.white,
),
),
),
),
],
),
),
);
}
}
Performance profiling on master channel
- The issue still persists on the master channel
Timeline Traces
Timeline Traces JSON
Video demonstration
Video demonstration
[Upload media here]
bug.mp4
IMG_2799.mp4
What target platforms are you seeing this bug on?
Android
OS/Browser name and version | Device information
UROVO DT40 (Android 11) most glitches
ATOL SMART LITE (Android 7) less frames glitches
NEWLAND N5S (Android ) most glitces
Does the problem occur on emulator/simulator as well as on physical devices?
I think depends on emulator, can not answer that question.
Is the problem only reproducible with Impeller?
Yes
Logs
No response
Flutter Doctor output
Doctor output
➤ flutter doctor --verbose git:dev
[✓] Flutter (Channel stable, 3.27.2, on macOS 15.2 24C101 darwin-arm64, locale en-EN)
• Flutter version 3.27.2 on channel stable at /Users/../.puro/envs/stable/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 68415ad1d9 , 2025-01-13 10:22:03 -0800
• Engine revision e672b006cb
• Dart version 3.6.1
• DevTools version 2.40.2
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/.../Library/Android/sdk
• Platform android-35, build-tools 34.0.0
• Java binary at: /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
• CocoaPods version 1.16.2
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2024.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 21.0.4+-12422083-b607.1)
[✓] VS Code (version 1.96.4)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.102.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.2 24C101 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.2 24C101 darwin-arm64
! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
Activity
[-]Severe glitches during route navigation, modals popup and scroll_view[/-][+]Glitches during route navigation, modals popup and scroll_view[/+]darshankawar commentedon Feb 3, 2025
@wratheus
Can you switch to latest master version and re-run your scenario on affected devices to check if the reported behavior still persist or not ?
flutter channel masterflutter upgradewratheus commentedon Feb 3, 2025
Unfortunately, the issue persists even after updating to Flutter 3.27.3. I tried updating with the following commands:
And this even feels a bit more glitches on this version
In the first post app is running in --profile, in the video attached to this post (with 3.27.3) the app is running in --release mode
2025-02-03.12.35.41-2.mp4
[-]Glitches during route navigation, modals popup and scroll_view[/-][+][Android Impeller] Glitches during using scrollview and also during route navigation, modals popup with scrollview containing elements[/+]darshankawar commentedon Feb 4, 2025
Thanks for the update. I actually meant to verify on latest master channel. So please try the same by switching to it and then re-running your scenario. As this seems device-specific which we don't have, will rely on your findings.
wratheus commentedon Feb 4, 2025
Thank you for your reply, I was unable to reproduce this bug at any of mentioned devices on Flutter version 3.29.0-0.2.pre on channel master
github-actions commentedon Feb 19, 2025
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.