Loading Button Plus

A customizable Flutter button that shows a loading indicator and prevents multiple taps.


✨ Features

  • Built-in loading indicator
  • Async button support
  • Fully customizable
  • Prevents double taps
  • Material Design compatible

📦 Installation

Add this to your pubspec.yaml:

dependencies: loading_button_plus: ^0.0.1

Run:

flutter pub get


🚀 Usage

Basic Loading Button:

LoadingButton( text: "Submit", isLoading: isLoading, onPressed: submit, )

Async Loading Button:

AsyncLoadingButton( text: "Login", onPressed: () async { await Future.delayed(const Duration(seconds: 2)); }, )


🎨 Customization

LoadingButton( text: "Pay Now", onPressed: pay, isLoading: isLoading, backgroundColor: Colors.green, borderRadius: 12, height: 50, width: 200, icon: Icons.payment, textStyle: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, ), )


📸 Screenshots

Idle Button:

Idle Button

Loading Button:

Loading Button

Async Button:

Async Button


🔧 Example

An example app is included.

cd example
flutter pub get
flutter run


📝 License

MIT License