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

glossy 封面
套件詳情v0.0.5

glossy

Glossy:一個用於創造流暢的玻璃質UI效果的Flutter套件,非常適合現代應用程式設計和時尚的使用者介面。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2790
喜歡數
115
Pub 分數
140

安裝套件

flutter pub add glossy

套件介紹

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

Glossy 是一個 Flutter 套件,讓開發者能輕鬆實現流暢的玻璃擬態 UI 效果。它提供可自訂的半透明、磨砂玻璃樣式元件,非常適合現代應用設計。支援所有主要平台——包含 Android、iOS、Web、macOS、Windows 與 Linux——Glossy 透過深度與視覺吸引力提升使用者介面。此套件輕量,並可透過簡單的 pub add 命令順利整合至現有的 Flutter 專案中。非常適合打造具有當代美學的時尚疊加層、卡片與浮動元素。

適用情境

  • 建立現代應用程式介面
  • 設計浮動UI卡片
  • 實現磨砂玻璃疊加
  • 透過透明度提升應用美學
  • 建構簡潔的導航欄
  • 為UI元件增加深度

主要特色

  • 透過 pub 輕鬆整合
  • 跨平台相容性
  • 可自定的模糊和不透明度
  • 支援陰影和邊框
  • 輕量且高效
  • 預定義的玻璃擬態小部件

適合對象

  • 尋求現代外觀的UI設計師
  • 開發時尚應用程式的開發者
  • 需要半透明效果的項目
  • Flutter 初學者探索進階 UI
  • 面向高階使用者體驗的應用

使用建議

  • 對低階設備的效能影響
  • 除了模糊和顏色之外,自訂選項有限
  • 可能需要在不同螢幕密度上進行測試
  • 不適合高對比度無障礙需求
  • 最適合搭配細膩的設計元素使用

原始 README

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

Screenshots

App Screenshot

Overview

This Flutter package allows you to easily create glass morphism effects in your Flutter applications. Glass morphism is a design trend that involves using blurred, semi-transparent elements to create a frosted glass-like effect.

Installation

To use this package, add glossy as a dependency in your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
  glossy: ^0.0.5

OR

Open your termilar in the project level and run this command.

flutter pub add glossy

Usage

You can use the GlossyContainer widget provided by this package to create glass morphism effects. Here's a basic example:

import 'package:flutter/material.dart';
import 'package:glossy/glossy.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.black,
        appBar: AppBar(
          title: const Text('Glass Morphism Example'),
        ),
        body: Center(
          child: SizedBox(
            width: 300,
            height: 300,
            child: Stack(
              children: [
                Container(
                  height: 140,
                  width: 140,
                  decoration: (BoxDecoration(
                      color: Colors.purple,
                      borderRadius: BorderRadius.circular(70))),
                ),
                Align(
                  alignment: Alignment.bottomRight,
                  child: Container(
                    height: 140,
                    width: 140,
                    decoration: (BoxDecoration(
                        color: Colors.purple,
                        borderRadius: BorderRadius.circular(70))),
                  ),
                ),
                Align(
                  alignment: Alignment.center,
                  child: GlossyContainer(
                    width: 200,
                    height: 200,
                    borderRadius: BorderRadius.circular(12),
                    child: const Center(
                      child: Text(
                        'Glass Morphism',
                        style: TextStyle(
                          fontSize: 20,
                          fontWeight: FontWeight.bold,
                          color: Colors.white,
                        ),
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Parameters

  • width: The width of the container required.
  • height: The height of the container required.
  • borderRadius: The border radius of the container.
  • blur: The amount of blur to apply to the container.
  • child: The widget placed inside the glass container.
  • color: Background color of the container.
  • opacity: Opacity of the container.
  • strengthX: Strength of blur in the horizontal direction.
  • strengthY: Strength of blur in the vertical direction.
  • border: Border of the container.
  • blendMode: Blend mode for applying filter.
  • gradient: Gradient of the container.
  • boxShadow: Box shadows for the container.
  • image: Background image of the container.
  • imageOpacity: Opacity of the background image.

Support

If you find this project helpful and would like to support its development, you can connect with me on social media:

Your support and feedback are greatly appreciated and will help in further improving this project.

所屬分類

原始碼儲存庫

使用此套件的專案