CustomLoaderButton constructor

CustomLoaderButton({
  1. Key? key,
  2. required String text,
  3. required bool isLoading,
  4. VoidCallback? onTap,
  5. Color? backgroundColor,
  6. Color? textColor,
  7. double? width,
  8. double? height,
  9. double? fontSize,
  10. double? borderRadius,
  11. double? elevation,
  12. EdgeInsetsGeometry? margin,
  13. EdgeInsetsGeometry? padding,
})

Implementation

CustomLoaderButton({
  super.key,
  required super.text,
  required super.isLoading,
  super.onTap,
  super.backgroundColor,
  super.textColor,
  super.width,
  super.height,
  super.fontSize,
  super.borderRadius,
  super.elevation,
  super.margin,
  super.padding,
}) : super(
  leading: isLoading
      ? SizedBox(
    height: 18,
    width: 18,
    child: CircularProgressIndicator(
      color: textColor ?? Colors.white,
      strokeWidth: 2,
    ),
  )
      : null,
);