Files
prosappco/lib/components/general_secondary_button.dart
T
2024-04-09 21:28:16 -05:00

39 lines
921 B
Dart

import 'package:flutter/material.dart';
class GeneralSecondaryButton extends StatelessWidget {
final String label;
final VoidCallback onPressed;
final Color? color;
const GeneralSecondaryButton({
super.key,
required this.label,
required this.onPressed,
this.color,
});
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed,
style: FilledButton.styleFrom(
backgroundColor: color ?? Theme.of(context).colorScheme.primary,
padding: const EdgeInsets.symmetric(vertical: 15),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
child: Container(
alignment: Alignment.center,
child: Text(
label,
style: const TextStyle(
color: Colors.white,
fontSize: 18,
),
),
),
);
}
}