createButton method
Implementation
Widget createButton(StringEnum text, Function() onTap, bool isOutline) {
if (isOutline) {
return SizedBox(
width: 90,
height: 35,
child: TextButton(
onPressed: onTap,
style: ButtonStyle(
padding: WidgetStateProperty.all(
const EdgeInsets.symmetric(horizontal: 16, vertical: 5),
),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
side: BorderSide(color: Color(0xff252525), width: 1),
),
),
),
child: BaseText(text, style: TextStyle(color: Color(0xff252525))),
),
);
} else {
return SizedBox(
width: 90,
height: 35,
child: TextButton(
onPressed: onTap,
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
backgroundColor: Color(0xff252525),
),
child: BaseText(
text,
style: TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.w500,
),
),
),
);
}
}