Files
prosappweb/lib/src/presentation/widgets/shared/primary_button.dart
T
2023-11-09 11:21:54 -05:00

38 lines
946 B
Dart

import 'package:flutter/material.dart';
class PrimaryButton extends StatelessWidget {
final VoidCallback onPressed;
final String text;
final double? minWidth;
final double? minHeight;
const PrimaryButton(
{super.key,
required this.onPressed,
required this.text,
this.minWidth = 200,
this.minHeight = 50});
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2BA4EC),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50),
),
elevation: 0,
minimumSize: Size(minWidth!, minHeight!),
),
child: Text(
text,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 17,
),
));
}
}