123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- import 'package:flutter/material.dart';
- class NewMemberWithChannel extends StatefulWidget {
- @override
- _NewMemberWithChannelState createState() => _NewMemberWithChannelState();
- }
- class _NewMemberWithChannelState extends State<NewMemberWithChannel> {
- final List<String> tags = [
- '学生',
- '良家',
- 'OL',
- '网红',
- '模特',
- '明星',
- '新人',
- '兼职',
- '短期',
- '原装',
- 'S身材',
- '高颜值',
- '三点粉',
- '微胖',
- '水嫩',
- '紧致',
- '清纯',
- '轻熟',
- '气质',
- '纯欲',
- ];
- final Set<String> 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,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- );
- }
- }
|