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.
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class DefaultButton extends StatelessWidget {
|
|
|
|
|
final String text;
|
|
|
|
|
final Function onPress;
|
|
|
|
|
final Color textColor;
|
|
|
|
|
final Color color;
|
|
|
|
|
DefaultButton(this.text, this.onPress, {this.color, this.textColor = Colors.white});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return SizedBox(
|
|
|
|
|
height: 43,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: FlatButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
onPress();
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
text,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48),
|
|
|
|
|
),
|
|
|
|
|
// color: Color(0xffD02127),
|
|
|
|
|
color: color ?? const Color(0xffD02127),
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(6),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|