44 lines
1.1 KiB
Dart
44 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../utils/dimensoes.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 heightCustom;
|
|
|
|
ButtonCustom({
|
|
required this.onPressed,
|
|
required this.text,
|
|
required this.fontsize,
|
|
required this.colorButton,
|
|
required this.colorText,
|
|
required this.colorBorder,
|
|
this.widthCustom = 1.0,
|
|
this.heightCustom = 1.0
|
|
});
|
|
@override
|
|
Widget build (BuildContext context) {
|
|
|
|
return ElevatedButton(
|
|
style: ElevatedButton.styleFrom(
|
|
primary: colorButton,
|
|
minimumSize: Size(Dimensoes.width*widthCustom! , Dimensoes.height*heightCustom!),
|
|
side: BorderSide(width: 2,color : colorBorder,),
|
|
),
|
|
onPressed: onPressed,
|
|
child: Text(text,
|
|
style: TextStyle(
|
|
color: colorText,
|
|
fontSize: fontsize,
|
|
fontWeight: FontWeight.bold
|
|
),
|
|
) ,
|
|
);
|
|
}
|
|
|
|
} |