Closed spkersten closed 2 weeks ago
Hi @spkersten, while I can reproduce this on the stable channel, I can't seem to reproduce this on either the beta
or master
channels.
Can you confirm if this still reproduces for you on either the beta
or master
channels? There's a possibility this never made it to stable 3.19 to begin with and as such may not be a regression
@danagbemava-nc I tested the example code in version 3.19.1 and version 3.19.4. The bug does not exist on 3.19.1, but exists on 3.19.4, which shows that it is actually a regression.
Just for context, I created the other closed ticket. Back then, I reported the bug on 3.16.5. In summary: 3.16.5 -> Bug 3.19.1 -> No bug 3.19.3 -> No bug 3.19.4 -> Bug
[EDIT] I bisected the version that re introduced the issue. It was good on 3.19.3, and bad on 3.19.4.
This is related to the https://github.com/flutter/engine/commit/8e7455253dece47278edaca6cdd14107c2d577a4 cherry pick in 3.19.4 but is not happening on the main branch.
@gabrielgarciagava, thanks for the investigation. I can confirm that this is the case.
Thanks @jason-simmons for the insight as well. I can confirm this is fine on the master channel as well.
Labeling based on the info above.
We're probably not going to cherry pick out this change, as it fixed another regression (imo worse, but they're both bad). Instead I would recommend updating to the beta, which will become the next stable soon.
Actually the current beta is 3.21, but 3.22 which will be released this week will be the next stable.
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 -v
and a minimal reproduction of the issue.
Steps to reproduce
Same issue as https://github.com/flutter/flutter/issues/140653 is back on Flutter 3.19.4
Expected results
No UI issues
Actual results
Some vertical black lines will appear on random cards.
Note that this issue only happens when running on iOS with Impeller enabled.
Code sample
Code sample
```dart // Copyright 2014 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; void main() => runApp(const AnimatedShadowIssueExampleApp()); class AnimatedShadowIssueExampleApp extends StatelessWidget { const AnimatedShadowIssueExampleApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar(title: const Text('Bug example')), backgroundColor: const Color(0xff222222), body: const SizedBox(height: 180, child: AnimatedShadowIssue()), ), ); } } class AnimatedShadowIssue extends StatelessWidget { const AnimatedShadowIssue({super.key}); @override Widget build(BuildContext context) { return const CustomScrollView( scrollDirection: Axis.horizontal, slivers: [ SliverToBoxAdapter(child: Square()), SliverToBoxAdapter(child: Square()), SliverToBoxAdapter(child: Square()), SliverToBoxAdapter(child: Square()), SliverToBoxAdapter(child: Square()), ], ); } } class Square extends StatefulWidget { const Square({super.key}); @override State> _shadowAnimation; @override void initState() { super.initState(); _pressAnimationController = AnimationController(vsync: this)..addListener(() => setState(() {})); _shadowAnimation = BoxShadowListTween(begin: normalShadows, end: pressedShadows).animate(_pressAnimationController); } @override void dispose() { _pressAnimationController.dispose(); super.dispose(); } Future animateDown() async {
try {
await _pressAnimationController
.animateTo(1, duration: const Duration(milliseconds: 100), curve: Curves.easeOutQuart)
.orCancel;
} on Exception {
// Will throw is onTapUp happens too fast. Ignore the exception
}
}
Future animateUp() async {
try {
await _pressAnimationController
.animateTo(0, duration: const Duration(milliseconds: 100), curve: Curves.easeOutQuart)
.orCancel;
} on Exception {
// Will throw is onTapDown happens too fast. Ignore the exception
}
}
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(4.0),
child: Opacity(
opacity: 0.8,
child: DecoratedBox(
decoration: BoxDecoration(
boxShadow: _shadowAnimation.value,
),
child: Stack(
children: [
const Positioned.fill(
child: ColoredBox(
color: Color(0xff20c0a0),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTapDown: (details) => animateDown(),
onTapUp: (details) => animateUp(),
onTapCancel: () => animateUp(),
child: const Center(
child: Padding(
padding: EdgeInsets.all(12.0),
child: Text("Wide card"),
),
),
),
],
),
),
),
);
}
}
class BoxShadowListTween extends Tween
> { BoxShadowListTween({required List begin, required List end}) : super(begin: begin, end: end);
@override
List lerp(double t) => BoxShadow.lerpList(begin, end, t)!;
}
const normalShadows = [
BoxShadow(
color: Color(0x39000000),
offset: Offset(0.0, 1.5),
blurRadius: 3.0,
spreadRadius: 0.0,
blurStyle: BlurStyle.normal,
),
BoxShadow(
color: Color(0x6c000000),
offset: Offset(0.0, 6.0),
blurRadius: 12.0,
spreadRadius: 0.0,
blurStyle: BlurStyle.normal,
)
];
const pressedShadows = [
BoxShadow(
color: Color(0x40000000),
offset: Offset(0.0, 1.0),
blurRadius: 2.0,
spreadRadius: 0.0,
blurStyle: BlurStyle.normal,
),
BoxShadow(
color: Color(0x73000000),
offset: Offset(0.0, 4.0),
blurRadius: 8.0,
spreadRadius: 0.0,
blurStyle: BlurStyle.normal,
)
];
```
Screenshots or Video
Screenshots / Video demonstration
https://github.com/flutter/flutter/assets/4456832/551bf9aa-f61f-4063-8f7b-698d1aef0082Logs
Logs
```console [Paste your logs here] ```Flutter Doctor output
Doctor output
```console [!] Flutter (Channel [user-branch], 3.19.4, on macOS 14.1.1 23B81 darwin-arm64, locale en-NL) • Framework revision 68bfaea224 (8 days ago), 2024-03-20 15:36:31 -0700 • Engine revision a5c24f538d • Dart version 3.3.2 • DevTools version 2.31.1 ```