import 'package:flutter/material.dart'; // ignore: must_be_immutable class MyButton extends StatelessWidget { final String text; VoidCallback onPressed; MyButton({ super.key, required this.text, required this.onPressed, }); @override Widget build(BuildContext context) { return MaterialButton( onPressed: onPressed, color: Colors.deepPurple, textColor: Colors.white, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(5))), highlightElevation: 20, padding: const EdgeInsets.all(20), child: Text(text), ); } }