Content-Length: 294435 | pFad | http://github.com/flutter/flutter/issues/171036

8B ImageFilter.blur with a high blur value causing rendering issues when over an image · Issue #171036 · flutter/flutter · GitHub
Skip to content

ImageFilter.blur with a high blur value causing rendering issues when over an image #171036

@underfilho

Description

@underfilho

Steps to reproduce

  1. Try the below code changing blur from 4 to 5
  2. Compare the two images (Bug only happens in some devices, mine is Zenfone 9, but also works in my friend's S21 smartphone)

Expected results

Blur should work with blur value 5 as it works with value 4 or in other devices

Actual results

Blur with value greater than 4 is causing rendering issues

Code sample

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

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

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

  double get blur => 4;
  double get colorOpacity => .5;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.white,
        body: Stack(
          children: [
            Center(
              child: Image.network(
                  'https://images.pexels.com/photos/7213438/pexels-photo-7213438.jpeg?_gl=1*x0gcwt*_ga*MTI5NDM5MzMyMS4xNzUwNzA2NTgy*_ga_8JE65Q40S6*czE3NTA3MDY1ODIkbzEkZzEkdDE3NTA3MDY2MDUkajM3JGwwJGgw'),
            ),
            BackdropFilter(
              filter: ImageFilter.blur(sigmaX: blur, sigmaY: blur),
              child: Container(
                decoration: BoxDecoration(
                  color: Colors.white.withValues(alpha: colorOpacity),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

blur value 4
Image
blur value 5
Image

Logs

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.27.4, on Microsoft Windows [versÆo 10.0.26100.4349], locale pt-BR)
    ! Warning: `flutter` on your path resolves to C:\Users\ander\fvm\versions\3.27.4\bin\flutter, which is not inside
      your current Flutter SDK checkout at C:\Users\ander\fvm\default. Consider adding C:\Users\ander\fvm\default\bin to
      the front of your path.
    ! Warning: `dart` on your path resolves to C:\Users\ander\fvm\versions\3.27.4\bin\dart, which is not inside your
      current Flutter SDK checkout at C:\Users\ander\fvm\default. Consider adding C:\Users\ander\fvm\default\bin to the
      front of your path.
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
[✓] Chrome - develop for the web
[✗] Visual Studio - develop Windows apps
    ✗ Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[✓] Android Studio (version 2024.3)
[✓] VS Code (version 1.101.1)
[✓] Connected device (4 available)
[✓] Network resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/flutter/flutter/issues/171036

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy