import 'package:flutter/material.dart'; class NewMemberWithoutChannel extends StatefulWidget { @override _NewMemberWithoutChannelState createState() => _NewMemberWithoutChannelState(); } class _NewMemberWithoutChannelState extends State { final TextEditingController _channelController = TextEditingController(); void _enterApp() { String channelName = _channelController.text.trim(); // Handle validation or navigation here print('Entered channel: $channelName'); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: const Color(0xFFF5F5F5), body: Center( child: Padding( padding: const EdgeInsets.symmetric(horizontal: 32.0), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ // Input box Container( padding: const EdgeInsets.symmetric(horizontal: 12.0), decoration: BoxDecoration( border: Border.all(color: Colors.grey), color: Colors.white, ), child: TextField( controller: _channelController, decoration: const InputDecoration( hintText: '请输入渠道名称(请前往下载网站获取)', border: InputBorder.none, ), ), ), const SizedBox(height: 32.0), // Button SizedBox( width: double.infinity, height: 56, child: ElevatedButton( onPressed: _enterApp, style: ElevatedButton.styleFrom( backgroundColor: Color(0xFF42A5F5), // Blue color shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), child: const Text( '进入APP', style: TextStyle( fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white, ), ), ), ), ], ), ), ), ); } }