You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
car_customer_app/lib/widgets/show_fill_button.dart

39 lines
1.0 KiB
Dart

import 'package:car_customer_app/extensions/string_extensions.dart';
import 'package:car_customer_app/theme/colors.dart';
import 'package:flutter/material.dart';
class ShowFillButton extends StatelessWidget {
String title;
VoidCallback onPressed;
Color txtColor;
double elevation, radius, width;
ShowFillButton({
required this.title,
required this.onPressed,
this.txtColor = Colors.white,
this.elevation = 4,
this.radius = 6,
this.width = 88,
});
@override
Widget build(BuildContext context) {
return ElevatedButton(
style: ElevatedButton.styleFrom(
onPrimary: Colors.black87,
primary: accentColor,
minimumSize: Size(width, 45),
padding: EdgeInsets.symmetric(horizontal: 16),
elevation: elevation,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(radius)),
),
),
onPressed: onPressed,
child: title.toUpperCase().toText(fontSize: 16, isBold: true),
);
}
}