ButtonWithLoader constructor

const ButtonWithLoader({
  1. Key? key,
  2. required String title,
  3. required void onPressed(
    1. Function startLoading,
    2. Function stopLoading,
    3. IsSuccess isSuccess,
    4. ButtonSpinnerState btnState,
    )?,
  4. TextStyle? titleStyle,
  5. IconData? successIcon,
  6. IconData? errorIcon,
  7. bool useFluentUi = false,
  8. Widget? loader,
  9. CircularProgressIndicator androidLoader = const mat.CircularProgressIndicator(color: Colors.white),
  10. CupertinoActivityIndicator iosLoader = const CupertinoActivityIndicator(color: Colors.white),
  11. ProgressRing fluentUILoader = const ProgressRing(activeColor: Colors.white),
  12. double borderRadius = 15,
  13. Duration animatedDuration = const Duration(milliseconds: 500),
  14. Color backgroundLoaderColor = const Color.fromARGB(0, 1, 85, 255),
  15. Color? successIconColor,
  16. Color? errorIconColor,
})

Implementation

const ButtonWithLoader({
  super.key,
  required this.title,
  required this.onPressed,
  this.titleStyle,
  this.successIcon,
  this.errorIcon,
  this.useFluentUi = false,
  this.loader,
  this.androidLoader =
      const mat.CircularProgressIndicator(color: Colors.white),
  this.iosLoader = const CupertinoActivityIndicator(color: Colors.white),
  this.fluentUILoader = const ProgressRing(activeColor: Colors.white),
  this.borderRadius = 15,
  this.animatedDuration = const Duration(milliseconds: 500),
  this.backgroundLoaderColor = const Color.fromARGB(0, 1, 85, 255),
  this.successIconColor,
  this.errorIconColor,
});