import 'package:flutter/material.dart'; class DefaultButton extends StatelessWidget { final String text; final VoidCallback onPress; final Color textColor; final Color color; final Color disabledColor; DefaultButton(this.text, this.onPress, {this.color, this.disabledColor, 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, fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48), ), // color: Color(0xffD02127), color: color ?? const Color(0xffD02127), disabledColor: disabledColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(6), ), ), ); } }