Fizzy Button ๐Ÿ’งโœจ

A beautiful, animated fizzy login button for Flutter with bubble effects, smooth loading transitions, and morphing into a circular progress indicator.


โœจ Features

  • ๐Ÿ’ง Fizzy bubble animation on tap
  • ๐Ÿ”„ Smooth transition to loading state
  • ๐Ÿ”˜ Button morphs into a circular loader
  • โšก Fully customizable (colors, text, size)
  • ๐Ÿ”Œ Async support for real login APIs
  • ๐ŸŽฏ Lightweight & easy to use

๐Ÿ“ธ Preview

Add your GIF here (recommended)

assets/demo.gif

๐Ÿš€ Installation

Add this to your pubspec.yaml:

dependencies:
  fizzy_button: ^0.0.1

Then run:

flutter pub get

๐Ÿ›  Usage

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

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black,
      body: Center(
        child: FizzyLoginButton(
          onTap: () async {
            await Future.delayed(const Duration(seconds: 2));
          },
        ),
      ),
    );
  }
}

โš™๏ธ Customization

FizzyLoginButton(
  width: 240,
  height: 60,
  text: "Sign In",
  loadingText: "Please wait...",
  gradientColors: [Colors.purple, Colors.blue],
  bubbleColor: Colors.white,
  textColor: Colors.white,
  onTap: () async {
    await Future.delayed(const Duration(seconds: 3));
  },
)

๐ŸŽฌ Behavior

  1. User taps button
  2. Fizzy bubbles animate
  3. Text changes to "Logging in..."
  4. Button shrinks into a circle
  5. Circular loader appears
  6. Returns to normal after async completes

๐Ÿง  API

Property Type Default Description
onTap Future<void> Function() null Async callback
width double 220 Button width
height double 60 Button height
text String "Login" Default label
loadingText String "Logging in..." Loading label
gradientColors List<Color> [blue, cyan] Background gradient
bubbleColor Color white Bubble color
textColor Color white Text color

๐Ÿงช Example

See the /example folder for a complete working app.


๐Ÿ“ฆ Roadmap

  • โœ… Loading animation
  • ๐Ÿ”œ Success checkmark animation
  • ๐Ÿ”œ Error state with shake
  • ๐Ÿ”œ Controller support
  • ๐Ÿ”œ More bubble physics customization

๐Ÿค Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.


๐Ÿ“„ License

MIT License ยฉ 2026


๐Ÿ’ก Author

Built with โค๏ธ using Flutter

Libraries

fizzybutton