Files
rkmmobile/lib/widgets/button_default.dart

47 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:rkm/utils/color_palette.dart';
import '../utils/const_variable.dart';
class ButtonDefault extends StatelessWidget {
var onPressed;
String title;
Color background;
Color textColor;
Color borderColor;
double width;
double height;
ButtonDefault({
required this.onPressed,
required this.title,
this.background = Colors.transparent,
this.textColor = ColorPalette.border,
this.borderColor = ColorPalette.border,
this.width = 100,
this.height = 50,
});
@override
Widget build(BuildContext context) {
return Container(
margin: ConstVariable().marginHightInput,
width: width,
height: height,
child: TextButton(
onPressed: onPressed,
style: TextButton.styleFrom(
backgroundColor: background,
foregroundColor: textColor,
side: BorderSide(width: 3,color: borderColor),
),
child: Text(
title,
style: TextStyle(
fontSize: ConstVariable().fontSizeInput
),
)
),
);
}
}