Files
mih-project/Frontend/patient_manager/lib/components/mybutton.dart

33 lines
821 B
Dart

import 'package:flutter/material.dart';
class MyButton extends StatelessWidget {
final void Function() onTap;
final String buttonText;
const MyButton({super.key, required this.onTap, required this.buttonText});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(25.0),
child: ElevatedButton(
onPressed: onTap,
style: ElevatedButton.styleFrom(
backgroundColor: Colors.blueAccent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
),
),
child: Text(
buttonText,
style: const TextStyle(
//fontWeight: FontWeight.bold,
fontSize: 20,
color: Colors.white,
),
),
),
);
}
}