flutter_easy_button 1.0.4 copy "flutter_easy_button: ^1.0.4" to clipboard
flutter_easy_button: ^1.0.4 copied to clipboard

A customizable Material 3 button package with filled and outlined styles, loading states, icons, and full customization support.

πŸš€ Flutter Easy Button #

pub package License: MIT

The simplest, most powerful button package for Flutter! 🎯

Create beautiful Material 3 buttons with just a few lines of code. No more boilerplate, no more complexityβ€”just clean, customizable buttons that work perfectly every time.


✨ Why Choose Flutter Easy Button? #

  • 🎨 Beautiful by Default - Material 3 design out of the box
  • ⚑ Lightning Fast - Zero dependencies, optimized performance
  • πŸ”„ Smart Loading States - Built-in loading indicators that preserve your colors
  • 🎯 Type-Safe - Compile-time safety with required parameters
  • πŸ› οΈ Highly Customizable - Control every aspect of your buttons
  • πŸ“± Production Ready - Battle-tested and ready for your app

🎯 Features #

Feature Description
🎨 Dual Button Styles Switch between filled and outlined with one parameter
⏳ Loading State Built-in spinners that maintain your brand colors
🚫 Disabled State Automatic styling with proper accessibility
πŸ–ΌοΈ Icon Support Add leading icons with customizable sizes
πŸ“ Full-Width Layout Responsive buttons that adapt to any screen
🎨 Custom Colors Complete control over background, text, and borders
✏️ Border Control Adjustable width and color for outlined buttons
πŸ”’ Type Safety Required parameters prevent runtime errors

πŸ“¦ Installation #

Add this to your pubspec.yaml:

dependencies:
  flutter_easy_button: ^1.0.3

πŸ’» Quick Start #

🎨 Filled Button (Primary Actions) #

import 'package:flutter_easy_button/flutter_easy_button.dart';

CustomButton(
  buttonText: 'Login',
  buttonColor: Colors.blue,
  textColor: Colors.white,
  buttonType: ButtonType.filled,
  onPressed: () {
    debugPrint('Button pressed');
  },
)

πŸ”² Outlined Button (Secondary Actions) #

CustomButton(
  buttonText: 'Cancel',
  buttonColor: Colors.blue,
  textColor: Colors.blue,
  buttonType: ButtonType.outlined,
  borderColor: Colors.red, // Optional custom border
  borderWidth: 2.0,
  onPressed: () {
    debugPrint('Button pressed');
  },
)

🎯 With Icons (Enhanced UX) #

CustomOutlineButton(
  buttonText: 'Sign Up',
  buttonColor: Colors.green,
  textColor: Colors.green,
  buttonType: ButtonType.outlined,
  icon: Icons.person_add, // Beautiful icons
  onPressed: () {
    debugPrint('Sign up pressed');
  },
)

⏳ Loading State (Smart & Automatic) #

CustomButton(
  buttonText: 'Submit',
  buttonColor: Colors.blue,
  textColor: Colors.white,
  buttonType: ButtonType.filled,
  isLoading: true, // Colors preserved automatically!
  loadingText: 'Submitting...',
  onPressed: () {},
)

πŸ“± Full-Width Responsive Button #

CustomButton(
  buttonText: 'Continue',
  buttonColor: Colors.purple,
  textColor: Colors.white,
  buttonType: ButtonType.filled,
  icon: Icons.arrow_forward,
  iconSize: 20,
  isFullWidth: true,
  onPressed: () {
    debugPrint('Continue pressed');
  },
)

πŸ“‹ Complete API Reference #

Parameter Type Required Default Description
buttonText String βœ… - Text displayed on the button
buttonColor Color βœ… - Background/border color
textColor Color βœ… - Text and icon color
buttonType ButtonType βœ… - Button style (filled/outlined)
onPressed VoidCallback βœ… - Callback when pressed
buttonTextId String? ❌ null Optional localization ID
icon IconData? ❌ null Optional leading icon
iconSize int ❌ 18 Icon size
borderColor Color? ❌ buttonColor Border color (outlined)
borderWidth double ❌ 2.0 Border width (outlined)
isLoading bool ❌ false Show loading indicator
isFullWidth bool ❌ false Expand to full width
isDisabled bool ❌ false Disable the button
loadingText String ❌ "Loading..." Text during loading

🎯 What Makes This Different? #

Unlike other button packages, Flutter Easy Button:

  • βœ… Preserves colors during loading - No more gray buttons when loading
  • βœ… Zero dependencies - Won't bloat your app
  • βœ… Type-safe by design - Catches errors at compile time
  • βœ… Material 3 compliant - Modern design standards
  • βœ… Production tested - Used in real-world apps

🀝 Contributing #

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


πŸ“„ License #

This package is licensed under the MIT License. See LICENSE for details.


⭐ Show Your Support #

If you find this package helpful, please give it a ⭐ on GitHub and like it on pub.dev!

Made with ❀️ for the Flutter community

11
likes
155
points
259
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable Material 3 button package with filled and outlined styles, loading states, icons, and full customization support.

Repository (GitHub)
View/report issues

Topics

#button #material3 #ui #widget #customizable

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_easy_button