Skip to main content
Stac BackdropFilter allows you to build the Flutter BackdropFilter widget using JSON. This widget applies a filter to the existing painted content and then paints its child. It’s commonly used to create frosted glass effects, blurs, and other visual effects. To know more about the BackdropFilter widget in Flutter, refer to the official documentation for Backdrop Filter and Image Filter.

Properties

Filter Types

The filter property accepts different types of image filters. Here are the supported filter types:

Blur Filter

Dilate Filter

Erode Filter

Compose Filter

Usage Recommendations

For best results with BackdropFilter:
  1. Use a Stack to position the BackdropFilter over content you want to filter
  2. Wrap the BackdropFilter in a ClipRRect to constrain the filter to a specific area
  3. Include a semi-transparent container as the child of the BackdropFilter to make the effect visible
  4. Use fit: expand on the Stack to ensure proper sizing

Example

Example 1: Frosted Glass Effect

Example 2: Dilate Filter Effect

Example 3: Compose Filter (Blur + Dilate)

Common Issues and Solutions

Issue: Filter affects entire screen

If your backdrop filter is affecting the entire screen instead of just a specific area, make sure to:
  1. Wrap the BackdropFilter in a ClipRRect to constrain its effects
  2. Use a Stack with the BackdropFilter as a child positioned over the content to filter
  3. Make sure the BackdropFilter is not at the root level of your widget tree

Issue: Filter not visible

If your filter effect isn’t visible:
  1. Ensure the child of the BackdropFilter has a semi-transparent color (e.g., #80FFFFFF)
  2. Check that the filter parameters (like sigmaX and sigmaY for blur) are large enough to be noticeable
  3. Verify that the content behind the filter has sufficient contrast to make the effect visible