EM2RP/em2rp/lib/views/widgets/auth/login_button.dart
2025-03-10 20:00:31 +01:00

31 lines
795 B
Dart

import 'package:em2rp/utils/colors.dart';
import 'package:flutter/material.dart';
class LoginButtonWidget extends StatelessWidget {
final bool isLoading;
final VoidCallback onPressed;
const LoginButtonWidget({
super.key,
required this.isLoading,
required this.onPressed,
});
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: isLoading ? null : onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.rouge,
padding: const EdgeInsets.symmetric(vertical: 15),
textStyle: const TextStyle(fontSize: 18),
),
child: isLoading
? const CircularProgressIndicator(
color: AppColors.blanc,
)
: const Text('Se connecter'),
);
}
}