progress_value_button

Creates a progress button with smooth animation with the supplied value in percentage.


Basic Example:

ProgressValueButton(
  value: 100.0,
  height: 65.0,
  onPressed: (progress) {},
  margin: const EdgeInsets.all(10.0),
  animationDuration: Duration(milliseconds: 8000),
  child: Text(
    "Uploading...",
    style: TextStyle(
      fontWeight: FontWeight.bold,
      color: Colors.white,
      fontSize: 18.0,
    ),
  ),
)

Parameters

parameterdescriptiondefault
valueThe percentage value of the progress indicator.required
widthThe width of the progress button.screen width
heightThe height of the progress button.50.0
childThe widget that is displayed in the center of the progress button. It is usually a text widget.null
borderRadiusThe border radius of the button.4.0
marginThe margin around the progress button.EdgeInsets.all(0.0)
backgroundColorThe background color of the progress button.Color(0xffd6d6d6)
progressColorThe color of the progress indicator.Colors.green
onPressedThe function that will be called when user taps on the button.required
onValueChangeThe function that will be called everytime the progress of the button changes.null
activeThe active state of the button.true
animationDurationThe animation duration of the progress animation.Duration(milliseconds: 2000)
animationCurveThe animation curve of the progress animationCurves.easeOutSine

Libraries

progress_value_button