This commit is contained in:
Felipe
2024-02-27 17:32:16 -05:00
parent 906ebb4330
commit a71fc9efb6
17 changed files with 1189 additions and 526 deletions
+32 -2
View File
@@ -1,10 +1,40 @@
import 'package:flutter/material.dart';
class GeneralPrimaryButton extends StatelessWidget {
const GeneralPrimaryButton({super.key});
final VoidCallback onPressed;
final String label;
final bool isEnabled;
const GeneralPrimaryButton({
super.key,
required this.onPressed,
required this.label,
this.isEnabled = true,
});
@override
Widget build(BuildContext context) {
return Container();
return ElevatedButton(
onPressed: isEnabled ? onPressed : null,
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.primary,
elevation: 0,
minimumSize: Size(
MediaQuery.of(context).size.width * 0.5,
50,
),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(50)),
),
),
child: Text(
label,
style: TextStyle(
color: isEnabled ? Colors.white : Colors.black,
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
);
}
}