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

glass 封面
套件詳情v3.0.1

glass

允許將任何小部件轉換為其「玻璃」或「磨砂玻璃」版本

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1470
喜歡數
136
Pub 分數
160

安裝套件

flutter pub add glass

套件介紹

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

該玻璃套件讓開發者能輕鬆將任何組件轉換為磨砂玻璃或玻璃擬態效果,非常適合現代UI設計。透過套用模糊與透明層,可創造出視覺上吸引人的半透明覆蓋效果,模擬現實世界中的磨砂玻璃。此套件輕巧且與Flutter的元件系統無縫整合,支援所有主要平台,包含行動裝置、網頁與桌面端。特別適用於打造具深度與優雅感的浮動卡片、對話方塊與背景效果。

適用情境

  • 建立磨砂玻璃使用者介面元件
  • 設計半透明疊加層
  • 建構現代應用程式介面
  • 增強佈局中的視覺深度
  • 實現浮動卡片和模態框

主要特色

  • 輕鬆實現元件到玻璃的轉換
  • 支援模糊效果
  • 跨平台相容性
  • 所需設定最少
  • 可自訂的透明度和模糊強度

適合對象

  • 尋求現代美學的UI設計師
  • 開發簡潔移動或網頁應用的開發者
  • 需要玻璃擬態設計模式的項目
  • 具有深色模式或沉浸式背景的應用程式

使用建議

  • 對低階設備的效能影響
  • 除了模糊和不透明度之外,自定選項有限
  • 可能需要額外的樣式才能達到最佳外觀
  • 不適合高對比度可訪問性場景

原始 README

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

Pub Version License

Glass

Easily convert any Widget into a glass / frosted glass version of itself, following the glassmorphism / glassmorphic design trend.

Sample screenshot Sample screenshot 2

Installation

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
    glass:
2. Install it

You can install packages from the command line:

$ pub get
..

Alternatively, your editor might support pub. Check the docs for your editor to learn more.

3. Import it

Now in your Flutter code, you can use:

import 'package:glass/glass.dart';

Usage

Simply call .asGlass() on the widget you want to convert to glass.

For example:

Container(
    child: someChild,
).asGlass()

A full example can be found in the example directory

About me

Visit my LinkedIn at https://www.linkedin.com/in/zaca

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。