ButtonWithLoader constructor
const
ButtonWithLoader({
- Key? key,
- required String title,
- required void onPressed(
- Function startLoading,
- Function stopLoading,
- IsSuccess isSuccess,
- ButtonSpinnerState btnState,
- TextStyle? titleStyle,
- IconData? successIcon,
- IconData? errorIcon,
- bool useFluentUi = false,
- Widget? loader,
- CircularProgressIndicator androidLoader = const mat.CircularProgressIndicator(color: Colors.white),
- CupertinoActivityIndicator iosLoader = const CupertinoActivityIndicator(color: Colors.white),
- ProgressRing fluentUILoader = const ProgressRing(activeColor: Colors.white),
- double borderRadius = 15,
- Duration animatedDuration = const Duration(milliseconds: 500),
- Color backgroundLoaderColor = const Color.fromARGB(0, 1, 85, 255),
- Color? successIconColor,
- 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,
});