28 lines
702 B
Dart
28 lines
702 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ServoButton extends StatelessWidget {
|
|
final String label;
|
|
final Color color;
|
|
final VoidCallback onPressed;
|
|
|
|
const ServoButton({
|
|
super.key,
|
|
required this.label,
|
|
required this.color,
|
|
required this.onPressed,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ElevatedButton(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: color,
|
|
padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 15),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
|
),
|
|
onPressed: onPressed,
|
|
child: Text(label, style: const TextStyle(fontSize: 16)),
|
|
);
|
|
}
|
|
}
|