Search packages, repositories and app categories

soft_edge_blur cover
Package detailsv0.1.3

soft_edge_blur

A customizable Flutter widget that applies a soft progressive blur effect to one or more edges of its child widget.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
14.2K
Likes
250
Pub points
160

Install package

flutter pub add soft_edge_blur

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A customizable Flutter widget that applies a soft progressive blur effect to one or more edges of its child widget. Ideal for creating subtle visual depth and modern UI effects, it allows precise control over blur intensity and edge direction. The package supports all major platforms including mobile, web, and desktop, making it versatile for cross-platform applications. It integrates seamlessly with existing Flutter layouts and enhances visual appeal without performance overhead.

Use cases

  • Creating soft edge transitions in cards
  • Enhancing background elements with depth
  • Designing floating UI components
  • Improving visual hierarchy in scrollable lists
  • Adding subtle blur effects to navigation bars

Key features

  • Customizable blur intensity
  • Support for individual edge targeting
  • Cross-platform compatibility
  • Lightweight and performant
  • Easy integration with existing widgets
  • Smooth progressive blur effect

Suitable for

  • UI designers seeking modern aesthetics
  • Developers building immersive interfaces
  • Apps requiring subtle visual layering
  • Projects targeting multiple platforms
  • Teams focused on performance and simplicity

Considerations

  • May impact performance on low-end devices
  • Blur quality depends on device rendering capabilities
  • Limited to edge-based blurring only
  • Not suitable for full-screen blur effects
  • Requires careful tuning for optimal visual results

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

banner

SoftEdgeBlur

pub package

A Flutter package that provides a customizable soft progressive blur effect for widgets.

Map blurred

Demos

Map - with control points

Airbnb Card with tint color

Screenshot 2024-09-17 at 22 22 01

Music play list with tint color

Screenshot 2024-09-17 at 22 22 01

Wallpapers grid with tilemode

Screenshot 2024-09-17 at 22 22 01

Usage

Import the package in your Dart code:

import 'package:soft_edge_blur/soft_edge_blur.dart';

Wrap any widget with SoftEdgeBlur to apply the blur effect:

return SoftEdgeBlur(
  edges: [
    EdgeBlur(
      type: EdgeType.topEdge,
      size: 100,
      sigma: 30,
      controlPoints: [
        ControlPoint(
          position: 0.5,
          type: ControlPointType.visible,
        ),
        ControlPoint(
          position: 1,
          type: ControlPointType.transparent,
        )
      ],
    )
  ],
  child: YourWidget(),
);

Customization

You can customize the following properties for each edge:

Edge Type

Specify which edges to apply the blur effect:

  • EdgeType.topEdge
  • EdgeType.bottomEdge
  • EdgeType.leftEdge
  • EdgeType.rightEdge

You can apply blur to multiple edges simultaneously.

Edge Size

Set the size of the blurred area. This determines how far the blur effect extends from the edge of the widget.

Blur Sigma

Adjust the intensity of the blur effect.

Tint Color

Apply a tint color on top of the blurred area.

Control Points

Define points to control the blur gradient along the edge. Each control point has two properties:

  • position: A value between 0.0 and 1.0, representing the position along the edge.
  • type: Either ControlPointType.visible or ControlPointType.transparent.
Try it live here

https://soft_edge_blur.codemagic.app/

Categories

Source repository

Projects using this package