buildOptionButton static method
Implementation
static Widget buildOptionButton(
int index,
bool isSelected,
String letter,
bool enable,
Function(int index) onOptionSelected,
) {
return SizedBox(
width: 40.w,
height: 40.w,
child: TextButton(
style: TextButton.styleFrom(
backgroundColor: isSelected ? const Color(0xff006CFF) : Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(3),
side: BorderSide(
color:
isSelected
? const Color(0xff006CFF)
: const Color(0xffD8E7FF),
width: 2.w,
),
),
splashFactory: InkRipple.splashFactory,
),
onPressed: enable ? () => onOptionSelected(index) : null,
child: Text(
letter,
style: TextStyle(
fontSize: 18.sp,
color: isSelected ? Colors.white : Color(0xff393939),
),
),
),
);
}