23 lines
544 B
Dart
23 lines
544 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class CustomButton extends StatelessWidget {
|
||
|
final VoidCallback onPressed;
|
||
|
final Icon icon;
|
||
|
|
||
|
CustomButton({required this.onPressed, required this.icon});
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return ElevatedButton(
|
||
|
onPressed: onPressed,
|
||
|
style: ElevatedButton.styleFrom(
|
||
|
shape: const CircleBorder(),
|
||
|
padding: const EdgeInsets.all(30),
|
||
|
backgroundColor: Colors.red,
|
||
|
foregroundColor: Colors.white,
|
||
|
),
|
||
|
child: icon,
|
||
|
);
|
||
|
}
|
||
|
}
|