import 'package:flutter/material.dart'; import '../core/app_theme.dart'; /// 统一样式的标签/筛选 Chip class AppTabChip extends StatelessWidget { final String label; final bool selected; final VoidCallback onTap; const AppTabChip({ super.key, required this.label, required this.selected, required this.onTap, }); @override Widget build(BuildContext context) { return GestureDetector( onTap: onTap, child: Container( margin: const EdgeInsets.only(right: AppTheme.sSm), padding: const EdgeInsets.symmetric(horizontal: AppTheme.sLg, vertical: AppTheme.sSm), decoration: BoxDecoration( color: selected ? AppTheme.primary : AppTheme.primaryLight, borderRadius: BorderRadius.circular(AppTheme.rPill), ), child: Text( label, style: TextStyle( fontSize: 16, fontWeight: FontWeight.w500, color: selected ? Colors.white : AppTheme.primary, ), ), ), ); } }