import 'package:flutter/material.dart'; class SubmitButton extends StatelessWidget { final VoidCallback onPressed; const SubmitButton({Key? key, required this.onPressed}) : super(key: key); @override Widget build(BuildContext context) { return Container( decoration: BoxDecoration( gradient: const LinearGradient( colors: [ Color(0xFF1DBF73), // Start of the gradient Color(0xFF11998E), // End of the gradient ], begin: Alignment.topLeft, end: Alignment.bottomRight, ), boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.2), spreadRadius: 2, blurRadius: 8, offset: const Offset(2, 4), // Shadow position ), ], borderRadius: BorderRadius.circular(8.0), ), child: ElevatedButton( onPressed: onPressed, style: ElevatedButton.styleFrom( backgroundColor: Colors.transparent, // Button background is transparent to show gradient shadowColor: Colors.transparent, // Remove the default shadow padding: const EdgeInsets.symmetric(vertical: 14.0), minimumSize: const Size(double.infinity, 50), // Bigger button size shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), ), ), child: const Text( 'Créer l\'événement', style: TextStyle( color: Colors.white, fontSize: 16, // Increase font size fontWeight: FontWeight.bold, // Bold text letterSpacing: 1.2, // Spacing between letters ), ), ), ); } }