Skip to content

[iOS] BoxShadow flickers when scrolling #148412

@koodimetsa

Description

@koodimetsa

Steps to reproduce

  1. Put a Container with BoxShadow inside SingleChildScrollView.
  2. Make content large enough to scroll.
  3. When scrolling, BoxShadow flickers.

Expected results

BoxShadow should have steady color without changes.

Actual results

BoxShadow flickers quite a lot.

Code sample

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

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

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    const dimension = 300.0;

    return MaterialApp(
      home: Scaffold(
        body: SingleChildScrollView(
            child: Column(
          children: [
            const SizedBox(height: 200),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Container(
                  height: dimension,
                  width: dimension,
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(dimension / 2),
                    boxShadow: const [
                      BoxShadow(
                        color: Color.fromRGBO(15, 119, 109, 0.3),
                        spreadRadius: 0,
                        blurRadius: 20,
                        offset: Offset(0, 2), /
                      ),
                    ],
                  ),
                ),
              ],
            ),
            const SizedBox(height: 1500),
          ],
        )),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
Simulator.Screen.Recording.-.iPhone.15.-.2024-05-15.at.17.00.46.mp4

Logs

No response

Flutter Doctor output

Doctor output

Stable

Flutter (Channel stable, 3.22.0, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.22.0 on channel stable at 
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (6 days ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

Master

Flutter (Channel master, 3.22.0-35.0.pre.10, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.22.0-35.0.pre.10 on channel master at 
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ddd6c86950 (12 hours ago), 2024-05-14 22:00:17 -0400
    • Engine revision d35a1a603c
    • Dart version 3.5.0 (build 3.5.0-154.0.dev)
    • DevTools version 2.36.0-dev.5

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levele: impellerImpeller rendering backend issues and features requestsslimpellerEngine binary size reduction. go/slimpellerteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions