Skip to content

Android: Blur widget causes UI flickering #173622

@RamonFarizel

Description

@RamonFarizel

Steps to reproduce

Steps to Reproduce:

  1. Run the code sample
  2. Scroll to the edges of the page

Expected results

Scroll without any flicker

Actual results

Flickering when the scrolling reaches the page limit

Findings:
During my investigation, I have noticed a few things.

  1. It only starts to happen if it has more than 1 blur widget.
  2. If I add a SafeArea, the flicker stops

Code sample

Code sample
import 'dart:ui';

import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: const MyApp(),
  ));
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          SingleChildScrollView(
            child: Column(
              children: [
                Container(
                  height: 800,
                  color: Colors.red,
                ),
                Container(
                  height: 800,
                  color: Colors.blue,
                ),
              ],
            ),
          ),
          ClipRect(
            child: BackdropFilter(
              filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
              child: Container(
                height: 50,
                width: 50,
                color: Colors.white.withAlpha(80),
              ),
            ),
          ),
          Positioned(
            left: 80,
            child: ClipRect(
              child: BackdropFilter(
                filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
                child: Container(
                  height: 50,
                  width: 50,
                  color: Colors.black.withAlpha(80),
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
android_bug.mov

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.5, on macOS 15.6 24G84 darwin-arm64, locale en-BR) [3.0s]
    • Flutter version 3.32.5 on channel stable at /Users/ramonfarizel/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fcf2c11572 (7 weeks ago), 2025-06-24 11:44:07 -0700
    • Engine revision dd93de6fb1
    • Dart version 3.8.1
    • DevTools version 2.45.1

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [5.1s]
    • Android SDK at /Users/ramonfarizel/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_SDK_ROOT = /Users/ramonfarizel/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 16.4) [7.4s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16F6
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [12ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.3) [12ms]
    • 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.6+-13368085-b895.109)

[✓] VS Code (version 1.103.0) [11ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.116.0

[✓] Connected device (4 available) [16.8s]    
    • SM S918B (mobile)                   • RXCW805BX9M               • android-arm64  • Android 13 (API 33)
    • ramon AT iPhone (wireless) (mobile) • 00008101-000A05392608801E • ios            • iOS 18.5 22F76
    • macOS (desktop)                     • macos                     • darwin-arm64   • macOS 15.6 24G84 darwin-arm64
    • Chrome (web)                        • chrome                    • web-javascript • Google Chrome 139.0.7258.67
    ! Error: Browsing on the local area network for Ramon’s iPad. 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 [350ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions