39 lines
921 B
Dart
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,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|