glass_ui_flutter 0.0.3 copy "glass_ui_flutter: ^0.0.3" to clipboard
glass_ui_flutter: ^0.0.3 copied to clipboard

Beautiful glassmorphism UI widgets for Flutter: cards, buttons, dialogs

glass_ui_flutter #

Beautiful, customizable glassmorphism widgets for Flutter!
Easily add modern, frosted glass effects with blur, gradients, and glow to your app’s UI.

Features #

  • GlassContainer: Core widget for building custom glassmorphism layouts.
  • GlassCard: Prebuilt card with glassy, frosted look.
  • GlassButton: Buttons with glassmorphism and smooth tap effect.
  • GlassDialog: Show dialogs with a beautiful glass effect.
  • Customizable blur, opacity, gradient, border, shadow, color, and more.
  • Works on Android, iOS, desktop, and web (where supported).

Getting started #

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

Usage #

Minimal example:


@override
Widget build(BuildContext context) {
  return Scaffold(
    body: Center(
      child: GlassContainer(
        blur: 10,
        opacity: 0.5,
        gradient: LinearGradient(
          colors: [
            Colors.white.withOpacity(0.1),
            Colors.white.withOpacity(0.2)
          ],
          begin: Alignment.topLeft,
          end: Alignment.bottomRight,
        ),
        child: Text('Hello, Glass!'),
      ),
    ),
  );
}



@override
Widget build(BuildContext context) {
  return Scaffold(
    body: Center(
      child: GlassCard(
        leading: Icon(Icons.star, color: Colors.white, size: 36),
        title: 'Glassmorphism Card',
        subtitle: 'Modern and beautiful.',
        onTap: () => print('Card tapped!'),
      ),
    ),
  );
}



@override
Widget build(BuildContext context) {
  return Scaffold(
    body: Center(
      child: GlassButton(
        child: Text('Press Me'),
        onTap: () => print('Button tapped!'),
      ),
    ),
  );
}



@override
Widget build(BuildContext context) {
  return Scaffold(
    body: Center(
      child: GlassButton(
        child: Text('Show Dialog'),
        onTap: () {
          showDialog(
            context: context,
            builder: (context) => GlassDialog(
              title: Text('Glass Dialog'),
              content: Text('This is a beautiful glassmorphism dialog.'),
              actions: [
                TextButton(
                  onPressed: () => Navigator.of(context).pop(),
                  child: Text('Close'),
                ),
              ],
            ),
          );
        },
      ),
    ),
  );
}


8
likes
130
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

Beautiful glassmorphism UI widgets for Flutter: cards, buttons, dialogs

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on glass_ui_flutter