Files
controle_acesso_educa/lib/widgets/buttom_custom.dart
2023-08-08 09:35:23 -03:00

44 lines
1.0 KiB
Dart

import 'package:flutter/material.dart';
class ButtonCustom extends StatelessWidget{
final VoidCallback onPressed;
final String text;
final double fontSize;
final Color colorButton;
final Color colorText;
final Color colorBorder;
final widthCustom;
final double height;
ButtonCustom({
required this.onPressed,
required this.text,
required this.fontSize,
required this.colorButton,
required this.colorText,
required this.colorBorder,
this.widthCustom = 1.0,
this.height = 42.0,
});
@override
Widget build (BuildContext context) {
double width =MediaQuery.of(context).size.width;
return ElevatedButton(
style: ElevatedButton.styleFrom(
primary: colorButton,
minimumSize: Size(width*widthCustom! , height),
side: BorderSide(width: 2,color : colorBorder,),
),
onPressed: onPressed,
child: Text(text,
style: TextStyle(
color: colorText,
fontSize: fontSize,
fontWeight: FontWeight.bold
),
) ,
);
}
}