progressive_button_flutter 0.0.2 copy "progressive_button_flutter: ^0.0.2" to clipboard
progressive_button_flutter: ^0.0.2 copied to clipboard

A Progressive Button with linear loading animation

Progressive Button #

A customizable Flutter button widget with built-in loading and progress indicators.

Features #

  • Customizable width and height
  • Built-in loading animation
  • Progress indicator with percentage
  • Circular progress indicator (optional)
  • Stretches to full width (optional)
  • Estimated time-based progress simulation

Parameters #

Parameter Type Default Value Description
text String Required The text to display on the button
onPressed Future<void> Function() Required The async function to execute when button is pressed
estimatedTime Duration Required Expected duration of the async operation
width double 200 Width of the button (ignored if stretched is true)
height double 40 Height of the button
backgroundColor Color Color(0xFFADD8E6) Background color of the button
progressColor Color Color(0xFF87CEEB) Color of the progress indicator
showCircularIndicator bool true Whether to show the circular loading indicator
progressCap double 0.9 Maximum progress value before completion (0.0 to 1.0)
stretched bool false Whether the button should stretch to full width

Usage #

// Fixed width button
AwesomeButton(
  text: "Submit",
  onPressed: () async => await submitData(),
  estimatedTime: Duration(seconds: 2),
);

// Full width button
AwesomeButton(
  text: "Submit",
  onPressed: () async => await submitData(),
  estimatedTime: Duration(seconds: 2),
  stretched: true,
);

// Custom styled button
AwesomeButton(
  text: "Submit",
  onPressed: () async => await submitData(),
  estimatedTime: Duration(seconds: 3),
  width: 250,
  height: 50,
  backgroundColor: Colors.blue,
  progressColor: Colors.lightBlue,
  showCircularIndicator: false,
  progressCap: 0.8,
);

🚀Showcase #

https://github.com/user-attachments/assets/43fe12b7-0861-4bb4-85f1-369fe14a2dd4

9
likes
140
points
70
downloads

Publisher

verified publisherswiftkart.icu

Weekly Downloads

A Progressive Button with linear loading animation

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on progressive_button_flutter