cpd_2022_zi/lib/widgets/buttons/round_button_widget.dart

28 lines
740 B
Dart

import 'package:flutter/material.dart';
class RoundIconButton extends StatelessWidget {
final VoidCallback onPressed;
final IconData iconData;
const RoundIconButton(
{super.key, required this.onPressed, required this.iconData});
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
shape: const CircleBorder(),
padding: const EdgeInsets.all(20),
backgroundColor: Colors.green, // <-- Button color
foregroundColor: Colors.blue, // <-- Splash color
),
child: Icon(
iconData,
color: Colors.white,
size: MediaQuery.of(context).size.height * 0.05,
),
);
}
}