搜尋套件、儲存庫與 APP 分類

soft_edge_blur 封面
套件詳情v0.1.3

soft_edge_blur

一個可自定義的 Flutter 小部件,可將其子小部件的一個或多個邊緣應用柔軟漸進的模糊效果。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1.4萬
喜歡數
250
Pub 分數
160

安裝套件

flutter pub add soft_edge_blur

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個可自訂的 Flutter 小部件,可對其子小部件的一個或多個邊緣應用柔軟漸進的模糊效果。非常適合創造微妙的視覺深度與現代 UI 效果,能夠精確控制模糊強度與邊緣方向。該套件支援所有主要平台,包含行動裝置、網頁與桌面端,適用於跨平台應用。它能順暢整合至現有的 Flutter 範本中,並在不增加效能負擔的情況下提升視覺吸引力。

適用情境

  • 在卡片中創建柔軟的邊緣過渡
  • 透過深度增強背景元素
  • 設計浮動UI組件
  • 改善可滾動列表中的視覺層次結構
  • 向導航欄添加細微的模糊效果

主要特色

  • 可自訂的模糊強度
  • 支援單個邊緣定位
  • 跨平台相容性
  • 輕量且高效
  • 與現有組件的輕鬆整合
  • 平滑漸進模糊效果

適合對象

  • 尋求現代美學的UI設計師
  • 開發沉浸式介面的開發者
  • 需要細微視覺層疊的應用程式
  • 針對多個平台的專案
  • 專注於效能與簡潔的團隊

使用建議

  • 可能影響低階裝置的效能
  • 模糊品質取決於裝置的渲染能力
  • 僅限邊緣模糊
  • 不適用於全螢幕模糊效果
  • 需要仔細調整才能獲得最佳視覺效果

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

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/

所屬分類

原始碼儲存庫

使用此套件的專案