dynamic_button_gradient 0.0.1 copy "dynamic_button_gradient: ^0.0.1" to clipboard
dynamic_button_gradient: ^0.0.1 copied to clipboard

A reusable customizable Flutter button with icon support.

📦 dynamic_button #

A flexible and fully customizable Flutter button widget that supports gradient backgrounds, outlined styles, prefix/suffix icons, custom fonts, and more — designed to make button creation elegant and reusable.


✨ Features #

  • ✅ Support for solid color or gradient background
  • Prefix & suffix icons
  • Custom font support
  • Outline or filled style toggle
  • ✅ Flexible TextStyle, padding, borderRadius
  • ✅ Responsive design for different screen sizes
  • ✅ Cleanly written and production-ready

🚀 Installation #

✅ Basic Example

DynamicButton(
text: 'Get Started',
onTap: () => print('Tapped!'),
)

🪄 Outline Button Example

DynamicButton(
text: 'Sign Up',
onTap: () {},
isOutline: true,
borderColor: Colors.deepPurple,
textColor: Colors.deepPurple,
)

🌈 Gradient Background Example

DynamicButton(
text: 'Continue',
onTap: () {},
backgroundColor: LinearGradient(
colors: [Colors.blue, Colors.purple],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
textColor: Colors.white,
)

⚙️ Parameters

Parameter	        Type	            Description
text	            String	            Button label (required if child is null)
onTap	            VoidCallback	    Function called on tap
prefixIcon	        Widget?	            Icon or widget to appear before the text
suffixIcon	        Widget?	            Icon or widget to appear after the text
backgroundColor	    Color or Gradient	Button fill — solid or gradient
customTextStyle	    TextStyle?	        Custom style for the text (optional)
textColor	        Color?	            Text color (used only if no customTextStyle passed)
isOutline	        bool	            True = outline style, false = filled style
borderColor	        Color?	            Color of the border when isOutline = true
borderRadius	    BorderRadius?	    Control corner radius
padding	            EdgeInsets?	        Optional internal padding
child	            Widget?	            Override everything with a custom child widget

Add the following to your pubspec.yaml:

dependencies:
  dynamic_button: ^0.0.1
7
likes
130
points
21
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A reusable customizable Flutter button with icon support.

License

MIT (license)

Dependencies

flutter, google_fonts

More

Packages that depend on dynamic_button_gradient