パッケージ、リポジトリ、アプリカテゴリを検索

glass_kit のカバー
パッケージ詳細v4.0.2

glass_kit

Flutterアプリでガラスモルフィズムを実装するためのウィジェットを含むパッケージ。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1.3万
いいね数
535
Pub ポイント
160

パッケージをインストール

flutter pub add glass_kit

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Glass Kit は、アプリケーションにガラスモルフィズム効果を実装するための使いやすいウィジェットを提供するFlutterパッケージです。開発者は、現代的なデザイントレンドでよく見られるぼかし効果や透明度を持つ、視覚的に魅力的な透過UIコンポーネントを作成できます。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど複数のプラットフォームをサポートしており、デバイス間で一貫したガラスモルフィックスタイルを確保します。pub addによる簡単な統合により、複雑なカスタムコーディングなしで洗練されたUI要素を追加するプロセスがスムーズになります。

用途

  • モダンなアプリインターフェースの作成
  • 透過性オーバーレイのデザイン
  • ダッシュボードの背景を作成する
  • ブラー付きのフローティングカードの実装
  • 視覚的奥行きによるユーザーエクスペリエンスの向上

主な機能

  • 事前構築されたガラスモルフィズムウィジェット
  • ブラー効果のサポート
  • 透過性とグラデーションのカスタマイズ
  • クロスプラットフォーム互換性
  • Flutterとの簡単な統合
  • レスポンシブデザインのサポート

適している対象

  • モダンな美学を求めるUIデザイナー
  • 洗練されたモバイルまたはWebアプリを開発する開発者
  • 没入型のビジュアルエフェクトを必要とするプロジェクト
  • 洗練されたユーザーインターフェースに注力するチーム
  • モダンなデザイントレンドをターゲットにしたアプリ

注意事項

  • 重いブラー効果によるパフォーマンスへの影響
  • 低性能デバイスでの最適化が必要になる場合があります
  • 基本的なガラススタイルを超えるカスタマイズは限られている
  • ライトテーマのデザインに最適
  • 高コントラストやダークモード中心のアプリには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Glass Kit

A package containing widgets to implement glass morphism in flutter apps


Platform Pub Package CI Codecov Coverage License: MIT Donate


Table of contents

About

GlassMorphism, is a new UI trend with a huge popularity among designers. Glass Kit provides you with widgets and other elements to implement this style in your flutter apps easily and efficiently.

Gallery:



ios-themed-glassmorphism         glassmorphism-in-card

Source code for the above can be found in the example directory here


Getting Started

You should add the following to the pubspec.yaml file:

dependencies:
  glass_kit: ^4.0.2

You should then run flutter packages get in your terminal so as to get the package.

Now import the package in the dart file:

import 'package:glass_kit/glass_kit.dart';

Usage

To create a basic clear glass container you can use the clearGlass constructor. If needed, just provide the height and width and you are good to go. The clearGlass and frostedGlass constructors assign default values to the properties if not provided.

GlassContainer.clearGlass(child: Child());

To create a frosted glass container use the frostedGlass constructor.

GlassContainer.frostedGlass(width: 300, child: Child());

Depending on your requirements you can tweak with the properties and create awesome glass widgets. You can also use the GlassContainer constructor to create fully customizable glass widgets.

Note : GlassContainer comes with properties as in a regular Container but with some exceptions and additions. Checkout the docs for the list of properties and their default values.

Here's a fully customized GlassContainer with shape as circle:

GlassContainer(
      height: 300,
      width: 400,
      gradient: LinearGradient(
        colors: [Colors.white.withOpacity(0.40), Colors.white.withOpacity(0.10)],
        begin: Alignment.topLeft,
        end: Alignment.bottomRight,
      ),
      borderGradient: LinearGradient(
        colors: [Colors.white.withOpacity(0.60), Colors.white.withOpacity(0.10), Colors.lightBlueAccent.withOpacity(0.05), Colors.lightBlueAccent.withOpacity(0.6)],
        begin: Alignment.topLeft,
        end: Alignment.bottomRight,
        stops: [0.0, 0.39, 0.40, 1.0],
      ),
      blur: 15.0,
      borderWidth: 1.5,
      elevation: 3.0,
      isFrostedGlass: true,
      shadowColor: Colors.black.withOpacity(0.20),
      alignment: Alignment.center,
      frostedOpacity: 0.12,
      margin: EdgeInsets.all(8.0),
      padding: EdgeInsets.all(8.0),
    );

Note : You can also provide borderRadius but when the shape is BoxShape.rectangle.

Bugs or Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull requests are also welcome.

See Contributing.md.

Contributors

Thanks goes to these wonderful people (emoji key):

Kabilan VS
Kabilan VS

🐛 💻
Martin Klüpfel
Martin Klüpfel

🚧 💻
Vladimir E. Koltunov
Vladimir E. Koltunov

🐛 💻

This project follows the all-contributors specification. Contributions of any kind are welcome! See Contributing.md.

License

glass_kit is licensed under MIT License

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト