Skip to content

Blur filter isn't clipped when using border radius #115926

Closed

Description

@erikkiralj1

Steps to Reproduce

  1. GitHub repo with reproducible example
  2. Run the app on iOS device, preferably iOS simulator

Expected results:
When adding a border radius to a widget, blur should be cut of to follow the radius of the widget

Actual results:
When adding a border radius to a widget, the blur stays the original size of the widget without the border radius

Code sample
// BlurredBlock.dart
// Container as a BackdropFilter child wrapped in ClipRect that has a given border radius 
return ClipRect(
      child: BackdropFilter(
        filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
        child: Container(
          width: 800,
          height: 800,
          decoration: BoxDecoration(
            color: Colors.black.withOpacity(0.5),
            borderRadius: BorderRadius.circular(500),
          ),
          child: const Center(
            child: Text('Blurred block 1'),
          ),
        ),
      ),
    );
// main.dart
// Renders Stack with Google Maps widget and BlurredBlock widget positioned on top of it in the center
 const Center(
              child: BlurredBlock(),
            )
Logs
[✓] Flutter (Channel master, 3.5.0-12.0.pre.175, on macOS 13.0 22A380 darwin-x64, locale en-HR)
    • Flutter version 3.5.0-12.0.pre.175 on channel master at /Users/erikkiralj/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 92f10ed712 (2 weeks ago), 2022-11-08 17:57:52 -0800
    • Engine revision e7d7edab98
    • Dart version 2.19.0 (build 2.19.0-374.0.dev)
    • DevTools version 2.19.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/erikkiralj/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • Java binary at: /Users/erikkiralj/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/erikkiralj/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/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 11.0.13+0-b1751.21-8125866)

[✓] Android Studio (version 2021.2)
    • Android Studio at /Users/erikkiralj/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8815526/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 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.73.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.52.0

[✓] Connected device (3 available)
    • iPad Pro (12.9-inch) (6th generation) (mobile) • ACDD46C2-E0C9-4F97-8E7C-DF60FC3EDF80 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-1 (simulator)
    • macOS (desktop)                                • macos                                • darwin-x64     • macOS 13.0 22A380 darwin-x64
    • Chrome (web)                                   • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Screenshot:

Simulator Screen Shot - iPad Pro (12 9-inch) (6th generation) - 2022-11-23 at 14 18 40

Activity

  1. mario-jerkovic commented on Nov 24, 2022

    @mario-jerkovic

    References: #115920

  2. danagbemava-nc commented on Nov 24, 2022

    @danagbemava-nc
    Member

    This doesn't seem to be an iOS-only issue as it seems to reproduce on android.

    screenshots
    android iOS
    code sample
    import 'dart:ui';
    
    import 'package:flutter/material.dart';
    import 'package:webview_flutter/webview_flutter.dart';
    
    void main() => runApp(const MyApp());
    
    class MyApp extends StatefulWidget {
      const MyApp({super.key});
    
      @override
      State<MyApp> createState() => _MyAppState();
    }
    
    class _MyAppState extends State<MyApp> {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            body: Stack(
              children: const [
                WebView(
                  initialUrl: 'https://flutter.dev',
                ),
                Center(
                  child: BlurredBlock(),
                )
              ],
            ),
          ),
        );
      }
    }
    
    class BlurredBlock extends StatelessWidget {
      const BlurredBlock({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        final mq = MediaQuery.of(context);
    
        return ClipRect(
          child: BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
            child: Container(
              width: mq.size.width * 0.5,
              height: mq.size.height * 0.5,
              decoration: BoxDecoration(
                color: Colors.black.withOpacity(0.5),
                borderRadius: BorderRadius.circular(500),
              ),
              child: const Center(
                child: Text('Blurred block 1'),
              ),
            ),
          ),
        );
      }
    }
    flutter doctor -v
    [✓] Flutter (Channel stable, 3.3.9, on macOS 13.0.1 22A400 darwin-arm, locale en-GB)
        • Flutter version 3.3.9 on channel stable at /Users/nexus/dev/sdks/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision b8f7f1f986 (35 hours ago), 2022-11-23 06:43:51 +0900
        • Engine revision 8f2221fbef
        • Dart version 2.18.5
        • DevTools version 2.15.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-33, build-tools 33.0.0
        • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14B47b
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [!] Android Studio
        • Android Studio at /Applications/Android Studio Preview.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
        ✗ Unable to find bundled Java version.
        • Try updating or re-installing Android Studio.
    
    [✓] Android Studio (version 2021.3)
        • 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 11.0.13+0-b1751.21-8125866)
    
    [!] Android Studio
        • Android Studio at /Applications/Android Studio Preview 2.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
        ✗ Unable to find bundled Java version.
        • Try updating or re-installing Android Studio.
    
    [✓] Android Studio (version 2021.3)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/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 11.0.13+0-b1751.21-8125866)
    
    [✓] Android Studio (version 2021.3)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/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 11.0.13+0-b1751.21-8125866)
    
    [✓] VS Code (version 1.73.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.52.0
    
    [✓] Connected device (5 available)
        • M2007J20CG (mobile)    • 5dd3be00                             • android-arm64  • Android 12 (API 31)
        • Nexus (mobile)         • 00008020-001875E83A38002E            • ios            • iOS 16.1.1 20B101
        • iPhone 14 Pro (mobile) • 4F72110C-F38B-4CF9-93C4-4D6042148D28 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-1 (simulator)
        • macOS (desktop)        • macos                                • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm
        • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 2 categories.
    
    [!] Flutter (Channel master, 3.6.0-7.0.pre.45, on macOS 13.0.1 22A400 darwin-arm64, locale en-GB)
        • Flutter version 3.6.0-7.0.pre.45 on channel master at /Users/nexus/dev/sdks/flutters
        ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision d0352f55db (8 hours ago), 2022-11-23 20:01:26 -0500
        • Engine revision 9b2895724c
        • Dart version 2.19.0 (build 2.19.0-424.0.dev)
        • DevTools version 2.19.0
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-33, build-tools 33.0.0
        • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14B47b
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [!] Android Studio
        • Android Studio at /Applications/Android Studio Preview.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
        ✗ Unable to find bundled Java version.
        • Try updating or re-installing Android Studio.
    
    [✓] Android Studio (version 2021.3)
        • 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 11.0.13+0-b1751.21-8125866)
    
    [!] Android Studio
        • Android Studio at /Applications/Android Studio Preview 2.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
        ✗ Unable to find bundled Java version.
        • Try updating or re-installing Android Studio.
    
    [✓] Android Studio (version 2021.3)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/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 11.0.13+0-b1751.21-8125866)
    
    [✓] Android Studio (version 2021.3)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/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 11.0.13+0-b1751.21-8125866)
    
    [✓] VS Code (version 1.73.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.52.0
    
    [✓] Connected device (5 available)
        • M2007J20CG (mobile)    • 5dd3be00                             • android-arm64  • Android 12 (API 31)
        • Nexus (mobile)         • 00008020-001875E83A38002E            • ios            • iOS 16.1.1 20B101
        • iPhone 14 Pro (mobile) • 4F72110C-F38B-4CF9-93C4-4D6042148D28 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-1 (simulator)
        • macOS (desktop)        • macos                                • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm64
        • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 3 categories.
    
    
  3. changed the title [-]Blur filter on iOS makes blur go outside of widget when using border radius[/-] [+]Blur filter isn't clipped when using border radius[/+] on Nov 24, 2022
  4. added
    engineflutter/engine related. See also e: labels.
    a: platform-viewsEmbedding Android/iOS views in Flutter apps
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed
    in triagePresently being triaged by the triage team
    on Nov 24, 2022
  5. EyrisCrafts commented on Nov 24, 2022

    @EyrisCrafts
    class BlurredBlock extends StatelessWidget {
      const BlurredBlock({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        final mq = MediaQuery.of(context);
    
        return ClipRRect(
          borderRadius: BorderRadius.circular(500),
          child: BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
            child: Container(
              width: mq.size.width * 0.5,
              height: mq.size.height * 0.5,
              decoration: BoxDecoration(
                color: Colors.black.withOpacity(0.5),
                borderRadius: BorderRadius.circular(500),
              ),
              child: const Center(
                child: Text('Blurred block 1'),
              ),
            ),
          ),
        );
      }
    }
    

    Use the above widget. You have to use ClipRRect and give it a custom borderRadius. ClipRect is a regular rectangle.

  6. erikkiralj1 commented on Nov 24, 2022

    @erikkiralj1
    Author

    @K-Rafiki Hello, tried it with your example of BlurredBlock, the issue is still there even when using ClipRRect.

    Simulator Screen Shot - iPad Pro (12 9-inch) (6th generation) - 2022-11-24 at 12 26 17

  7. EyrisCrafts commented on Nov 24, 2022

    @EyrisCrafts

    Did you add the
    borderRadius: BorderRadius.circular(500), as a parameter of ClipRRect. Please copy the example as is.

    This is how the 3 lines should look line.

    return ClipRRect(
    borderRadius: BorderRadius.circular(500),
    child: BackdropFilter(

  8. erikkiralj1 commented on Nov 24, 2022

    @erikkiralj1
    Author

    @K-Rafiki Yes, i tried with the same example you posted.

    Code
    import 'dart:ui';
    
    import 'package:flutter/material.dart';
    
    class BlurredBlock extends StatelessWidget {
      const BlurredBlock({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        final mq = MediaQuery.of(context);
    
        return ClipRRect(
          borderRadius: BorderRadius.circular(500),
          child: BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
            child: Container(
              width: mq.size.width * 0.5,
              height: mq.size.height * 0.5,
              decoration: BoxDecoration(
                color: Colors.black.withOpacity(0.5),
                borderRadius: BorderRadius.circular(500),
              ),
              child: const Center(
                child: Text('Blurred block 1'),
              ),
            ),
          ),
        );
      }
    }
  9. 36 remaining items

  10. Hari-07 commented on May 29, 2025

    @Hari-07
    Member

    I actually have a branch that fixes this, but then when the monorepo change happened ran into a bunch of merge conflicts rebasing my changes, and I just never got around to fix it. If no one else gets to it soon, will open a PR in a couple weekends

  11. hoxa-k commented on Jun 26, 2025

    @hoxa-k

    This is very useful now that Apple's Liquid Glass design has come out. We are really looking forward to this PR

  12. khaled-0 commented on Sep 9, 2025

    @khaled-0
  13. Haotian9850 commented on Oct 25, 2025

    @Haotian9850
  14. danilz-276 commented on Nov 19, 2025

    @danilz-276
  15. codedoga commented on Jan 14, 2026

    @codedoga
  16. hellohuanlin commented on Jan 16, 2026

    @hellohuanlin
    Contributor

    @Hari-07 hi is this issue fixed by #177551? Can this be closed?

  17. Hari-07 commented on Jan 16, 2026

    @Hari-07
    Member

    Yes it does. I had mentioned this issue in that PR unsure why it didn't auto close

  18. hellohuanlin commented on Jan 16, 2026

    @hellohuanlin
    Contributor

    Thanks for confirming. Closing as complete

  19. jmagman commented on Jan 16, 2026

    @jmagman
    Member

    Thank you so much @Hari-07!

    Yes it does. I had mentioned this issue in that PR unsure why it didn't auto close

    Next time try "Fixes #" keyword, like this: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue

    The fix is available in beta 3.41.0-0.0.pre. If anyone sees additional issues around this problem, please file them!

  20. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jan 19, 2026
  21. github-actions commented on Feb 2, 2026

    @github-actions

    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.

  22. locked as resolved and limited conversation to collaborators on Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsc: renderingUI glitches reported at the engine/skia or impeller rendering levelcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.found in release: 3.3Found to occur in 3.3found in release: 3.6Found to occur in 3.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions