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

figma_squircle 封面
套件詳情v0.6.3

figma_squircle

適用於 Flutter 的平滑圓角半徑。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
4.7萬
喜歡數
285
Pub 分數
140

安裝套件

flutter pub add figma_squircle

套件介紹

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

FigmaSquircle 是一個 Flutter 套件,為 UI 元件提供平滑、受 Figma 啟發的圓角半徑。它讓開發者能夠精確控制曲率,創造出視覺上吸引人的圓角效果,模擬 Figma 的設計語言。此套件可在所有主要平台——Android、iOS、Web、macOS、Windows 和 Linux 上運作,確保外觀一致。非常適合現代應用程式介面,其中微妙而優雅的圓角能提升使用者體驗。該套件以效能為設計核心,透過簡單直覺的 API 順暢整合至現有的 Flutter 專案中。

適用情境

  • 建立Figma風格的圓角按鈕
  • 設計現代卡片組件
  • 實現流暢的使用者介面過渡
  • 使用圓角構建響應式佈局
  • 增強跨平台的視覺一致性

主要特色

  • Figma 風格的角落曲率
  • 跨平台相容性
  • 與 Flutter widget 的簡單整合
  • 高效能渲染
  • 可自定的半徑和曲率
  • 同時支援裁剪與裝飾使用案例

適合對象

  • 在Flutter中工作的UI設計師
  • 開發現代移動或Web應用的開發者
  • 重視設計一致性的團隊
  • 需要順暢、自然外觀的圓角專案
  • 針對多平台的統一設計應用

使用建議

  • 可能需要額外的樣式來處理複雜形狀
  • 對大量元素的性能影響
  • 僅限圓角自訂
  • 不適用於非圓角幾何形狀
  • 最佳搭配相容的設計系統使用

原始 README

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

Figma Squircle

image

Flutter implementation of Figma's corner smoothing.

Usage

Decoration

The SmoothRectangleBorder can be provided to a regular ShapeDecoration with a custom SmoothBorderRadius.

Container(
    height: 100,
    width: 100,
    decoration: ShapeDecoration(
        color: Colors.red.withOpacity(0.75),
        shape: SmoothRectangleBorder(
            borderRadius: SmoothBorderRadius(
              cornerRadius: 10,
              cornerSmoothing: 0.5,
            ),
        ),
    ),
)
Only

Each corner can have an independent smoothing and radius.

SmoothBorderRadius.only(
    topLeft: SmoothRadius(
        cornerRadius: 10,
        cornerSmoothing: 1,
    ),
    topRight: SmoothRadius(
        cornerRadius: 20,
        cornerSmoothing: 0.4,
    ),
    bottomLeft: SmoothRadius(
        cornerRadius: 5,
        cornerSmoothing: 0.8,
    ),
    bottomRight: SmoothRadius(
        cornerRadius: 30,
        cornerSmoothing: 0.6,
    ),
),
Clip

To clip any widget with a smooth rectangle, use the ClipSmoothRect.

ClipSmoothRect(
    radius: SmoothBorderRadius(
        cornerRadius: 10,
        cornerSmoothing: 1,
    ),
    child: Container(
        color: Colors.red,
        width: 100,
        height: 100,
    ),
)

Thanks

所屬分類

原始碼儲存庫

使用此套件的專案