import 'package:dating_touchme_app/components/page_appbar.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:tdesign_flutter/tdesign_flutter.dart'; class MessageSettingPage extends StatefulWidget { const MessageSettingPage({super.key}); @override State createState() => _MessageSettingPageState(); } class _MessageSettingPageState extends State { bool blockUser = false; @override Widget build(BuildContext context) { return Scaffold( appBar: PageAppbar(title: "聊天设置",), body: SingleChildScrollView( child: Container( padding: EdgeInsets.only( top: 26.w, right: 41.w, left: 30.w ), child: Column( children: [ Container( padding: EdgeInsets.only( bottom: 30.w ), decoration: BoxDecoration( border: Border( bottom: BorderSide( width: 1, color: const Color.fromRGBO(245, 245, 245, 1) ) ) ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ ClipRRect( borderRadius: BorderRadius.all(Radius.circular(120.w)), child: Image.asset( "assets/user_avatar.png", width: 120.w, height: 120.w, ), ), SizedBox(width: 32.w,), Text( "林园园", style: TextStyle( fontSize: 35.w, color: const Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500 ), ) ], ), Icon( Icons.keyboard_arrow_right, size: 26.w, color: const Color.fromRGBO(191, 191, 191, 1) ) ], ), ), Container( height: 84.w, decoration: BoxDecoration( border: Border( bottom: BorderSide( width: 1, color: const Color.fromRGBO(245, 245, 245, 1) ) ) ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "设置备注名", style: TextStyle( fontSize: 26.w, color: const Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500 ), ), Icon( Icons.keyboard_arrow_right, size: 26.w, color: const Color.fromRGBO(191, 191, 191, 1) ) ], ), ), Container( height: 84.w, decoration: BoxDecoration( border: Border( bottom: BorderSide( width: 1, color: const Color.fromRGBO(245, 245, 245, 1) ) ) ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "加入黑名单", style: TextStyle( fontSize: 26.w, color: const Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500 ), ), TDSwitch( isOn: blockUser, trackOnColor: const Color.fromRGBO(117, 98, 249, 1), onChanged: (bool e){ print(e); blockUser = e; setState(() { }); return e; }, ), ], ), ), Container( height: 84.w, decoration: BoxDecoration( border: Border( bottom: BorderSide( width: 1, color: const Color.fromRGBO(245, 245, 245, 1) ) ) ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "举报", style: TextStyle( fontSize: 26.w, color: const Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500 ), ), Icon( Icons.keyboard_arrow_right, size: 26.w, color: const Color.fromRGBO(191, 191, 191, 1) ) ], ), ), SizedBox(height: 30.w ,), Container( width: 650.w, height: 90.w, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(90.w)), color: Color.fromRGBO(117, 98, 249, 1) ), child: Center( child: Text( "关注", style: TextStyle( fontSize: 36.w, color: Colors.white, fontWeight: FontWeight.w500 ), ), ), ) ], ), ), ), ); } }