FLUTTER ECOSYSTEM

joysarkar18/glossy

이것은 제가 만든 글래스모픽 UI 컴포넌트를 만들기 위한 플러터 패키지입니다. 이 종속성을 프로젝트에 추가하려면 flutter pub add glossy를 실행하세요. 자세한 정보는 ReadMe 파일을 참조하세요.

광택 있는 프로젝트 이미지
Stars
19
Forks
1
최근 푸시(UTC)
2025. 1. 6.
프로젝트 상태
활성
joy sarkar GitHub avatar
GITHUB User

joy sarkar ↗

My name is Joy Sarkar, and I'm a passionate Android developer who's always looking to learn new technologies. I specialize in building high-quality Android appl

CabswaleKolkata, West Bengal공식 웹사이트 ↗
언어Dart

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^2.0.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

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.