custom_button_library 0.0.3
custom_button_library: ^0.0.3 copied to clipboard
A flexible and customizable Flutter button library with multiple variants like primary, outline, gradient and icon buttons.
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!