in lib/ui/aliplayer_custom_selector_widget.dart [141:164]
Widget _buildSingleItem(T option) {
final isSelected = option == _currentValue;
// 如果 displayFormatter 为空,使用默认的 toString() 方法
final displayText = widget.displayFormatter != null
? widget.displayFormatter!(option)
: option.toString();
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () => _onValueChanged(option),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Text(
displayText,
style: TextStyle(
color: isSelected ? Colors.blue : Colors.grey,
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
fontSize: 12,
),
),
),
);
}