import 'package:flutter/material.dart'; class NewMemberWithChannel extends StatefulWidget { @override _NewMemberWithChannelState createState() => _NewMemberWithChannelState(); } class _NewMemberWithChannelState extends State { final List tags = [ '学生', '良家', 'OL', '网红', '模特', '明星', '新人', '兼职', '短期', '原装', 'S身材', '高颜值', '三点粉', '微胖', '水嫩', '紧致', '清纯', '轻熟', '气质', '纯欲', ]; final Set selectedTags = {}; void _toggleTag(String tag) { setState(() { if (selectedTags.contains(tag)) { selectedTags.remove(tag); } else { selectedTags.add(tag); } }); } void _goToNextStep() { print('Selected tags: $selectedTags'); // Add navigation logic here } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: const Color(0xFFF5F5F5), body: SafeArea( child: Column( children: [ // Top image placeholder Padding( padding: const EdgeInsets.all(16.0), child: Container( height: 160, width: double.infinity, decoration: BoxDecoration( color: Colors.grey[300], borderRadius: BorderRadius.circular(16), ), child: const Center( child: Icon(Icons.image, size: 80, color: Colors.grey), ), ), ), const Text( '请选择您喜欢的外围类型(支持多选)', style: TextStyle(fontSize: 16), ), const SizedBox(height: 12), // Tags Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Wrap( spacing: 12, runSpacing: 12, children: tags.map((tag) { final isSelected = selectedTags.contains(tag); return ChoiceChip( label: Text( tag, style: TextStyle( color: isSelected ? Colors.white : Colors.black, fontWeight: FontWeight.bold, ), ), selected: isSelected, onSelected: (_) => _toggleTag(tag), selectedColor: Colors.blue, backgroundColor: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), side: BorderSide(color: Colors.grey.shade400), ), ); }).toList(), ), ), const Spacer(), // Next button Padding( padding: const EdgeInsets.symmetric(horizontal: 32.0, vertical: 24.0), child: SizedBox( width: double.infinity, height: 56, child: ElevatedButton( onPressed: _goToNextStep, style: ElevatedButton.styleFrom( backgroundColor: Color(0xFF42A5F5), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), child: const Text( '下一步', style: TextStyle( fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white, ), ), ), ), ), ], ), ), ); } }