diff --git a/creche_app/lib/shared/widgets/custom_button.dart b/creche_app/lib/shared/widgets/custom_button.dart deleted file mode 100644 index 754017a..0000000 --- a/creche_app/lib/shared/widgets/custom_button.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:flutter/material.dart'; - -class CustomButton extends StatelessWidget { - final String text; - final VoidCallback? onPressed; - final Color? backgroundColor; - final Color? textColor; - final IconData? icon; - final bool isLoading; - - const CustomButton({ - super.key, - required this.text, - this.onPressed, - this.backgroundColor, - this.textColor, - this.icon, - this.isLoading = false, - }); - - @override - Widget build(BuildContext context) { - return ElevatedButton( - onPressed: isLoading ? null : onPressed, - style: ElevatedButton.styleFrom( - backgroundColor: backgroundColor ?? Theme.of(context).colorScheme.primary, - foregroundColor: textColor ?? Colors.white, - minimumSize: const Size(double.infinity, 52), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), - elevation: 2, - ), - child: isLoading - ? const SizedBox( - height: 22, - width: 22, - child: CircularProgressIndicator( - color: Colors.white, strokeWidth: 2.5), - ) - : Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (icon != null) ...[ - Icon(icon, size: 20), - const SizedBox(width: 8), - ], - Text(text, - style: const TextStyle( - fontSize: 16, fontWeight: FontWeight.bold)), - ], - ), - ); - } -}