glassmorph 0.0.7

SDKflutter
Platformandroidioswindowslinuxmacosweb

A customizable, lightweight Flutter widget for applying glassmorphism UI effects using blur, transparency, and optional borders.

Glassmorph

A lightweight and customizable Flutter widget for applying Glassmorphism effects to any container. Easily add blur, transparency, and optional borders to give your UI a modern, frosted-glass look.

Pub Version Buy Me a Coffee

✨ Features

  • Customizable blur intensity
  • Background color with transparency
  • Optional glass border
  • Configurable padding and border radius
  • Easy to integrate

📦 Installation

Add the following to your pubspec.yaml:

dependencies:
  glassmorph: <latest_version>

Replace <latest_version> with the current version of your package.

🔧 Usage

import 'package:glassmorph/glassmorph.dart';

Glassmorph(
  borderRadius: 20,
  glassEffect: 10,
  glassBGColor: Colors.white.withOpacity(0.2),
  enableGlassBorder: true,
  glassBorder: Colors.white.withOpacity(0.3),
  padding: EdgeInsets.all(16),
  child: Text(
    'Hi Maninder Singh',
    style: TextStyle(color: Colors.white),
  ),
)

🖼️ Welcome to Glassmorph

Welcome to Glassmorph

📄 Parameters

PropertyTypeDescriptionDefault
childWidgetRequired. Content inside the glass container—
paddingEdgeInsets?Inner paddingEdgeInsets.all(15)
borderRadiusdouble?Border radius for rounded corners25.0
glassEffectdouble?Blur intensity for the background15.0
glassBGColorColor?Background color with opacityColors.white.withOpacity(0.2)
enableGlassBorderboolToggle border around the glass containerfalse
glassBorderColor?Color of the optional borderColors.white.withOpacity(0.3)

📦 Internals

The main implementation lives in:


📜 License

MIT License. See LICENSE for more information.