Skip to content

harshitAmar/custom_button_library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Button Kit 🚀

A powerful, flexible and production-ready Flutter button library that provides multiple button variants built on top of a single core engine.

This package is designed to help you build a consistent, scalable and reusable button system for your Flutter apps.


✨ Features

  • ✅ Primary, Outline, Gradient, Danger buttons
  • ✅ Icon-only buttons (filled, outline, gradient)
  • ✅ Loading & disabled states
  • ✅ Left & right icons
  • ✅ Full customization (colors, radius, shadows, borders, decoration)
  • ✅ Safe API with assertions
  • ✅ Clean, extensible architecture
  • ✅ Well-documented & tested

📦 Installation

flutter pub add custom_button

or

dependencies:
  your_package_name: ^1.0.0

🚀 Basic Usage
import 'package:your_package_name/your_package_name.dart';

    PrimaryButton(
     text: "Save",
     onTap: () {},
    );


    
🧩 Button Variants

    Primary Button

        PrimaryButton(
          text: "Continue",
          onTap: () {},
         );

    Outline Button

        OutlineButton(
         text: "Cancel",
         onTap: () {},
        );
    Gradient Button
        GradientButton(
         text: "Upgrade",
         gradient: LinearGradient(colors: [Colors.purple, Colors.blue]),
         onTap: () {},
        );

    Danger Button
        DangerButton(
         text: "Delete",
         onTap: () {},
        );

🧿 Icon Buttons
        IconOnlyButton(
         icon: Icon(Icons.edit),
         onTap: () {},
        );

        OutlineIconButton(
         icon: Icon(Icons.delete),
         onTap: () {},
        );

        GradientIconButton(
         icon: Icon(Icons.add),
         gradient: LinearGradient(colors: [Colors.green, Colors.blue]),
         onTap: () {},
        );


⏳ Loading & Disabled
        PrimaryButton(
         text: "Saving...",
         isLoading: true,
         onTap: () {},
        );

        PrimaryButton(
         text: "Submit",
         enabled: false,
         onTap: () {},
        );



📱 Example App

    A full component gallery is included inside the /example folder.

    Run it using:

    cd example
    flutter run

🧪 Testing
    flutter test

🤝 Contributing

    Contributions, issues, and feature requests are welcome!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published