Implementation
Widget buttonWidget(CowGroup? group) {
return GestureDetector(
onTap: () {
cowGroupState.changeCurrentGroup(group);
LogManager().addLog("${group?.name == null ? "전체" : group?.name} 그룹 버튼 선택", action: LogConstants.menuTap);
if (widget.onTap != null) widget.onTap!(group);
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: BoxDecoration(
color: (group == cowGroupState.currentCowGroup) ? Colors.white : Colors.transparent,
borderRadius: BorderRadius.circular(30),
),
child: Text(group == null ? "전체" : group.name, style: TextStyle(fontWeight: FontWeight.bold), textAlign: TextAlign.center),
),
);
}