You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

394 lines
14 KiB

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 ReportPage extends StatefulWidget {
const ReportPage({super.key});
@override
State<ReportPage> createState() => _ReportPageState();
}
class _ReportPageState extends State<ReportPage> {
int checked = 0;
String message = '';
bool blockUser = false;
final TextEditingController _messageController = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PageAppbar(title: "举报中心"),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(
top: 6.w,
right: 10.w,
left: 20.w
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"请选择举报的原因",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
),
],
),
SizedBox(height: 9.w ,),
SizedBox(
height: 32.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"资料作假",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500
),
),
Checkbox(
value: checked == 1,
onChanged: (value) {
checked = 1;
},
activeColor: const Color.fromRGBO(117, 98, 249, 1),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
),
SizedBox(
height: 32.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"色情低俗",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500
),
),
Checkbox(
value: checked == 1,
onChanged: (value) {
checked = 1;
},
activeColor: const Color.fromRGBO(117, 98, 249, 1),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
),
SizedBox(
height: 32.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"涉政/涉独",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500
),
),
Checkbox(
value: checked == 1,
onChanged: (value) {
checked = 1;
},
activeColor: const Color.fromRGBO(117, 98, 249, 1),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
),
SizedBox(
height: 32.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"违法违禁",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500
),
),
Checkbox(
value: checked == 1,
onChanged: (value) {
checked = 1;
},
activeColor: const Color.fromRGBO(117, 98, 249, 1),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
),
SizedBox(
height: 32.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"未成年相关",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500
),
),
Checkbox(
value: checked == 1,
onChanged: (value) {
checked = 1;
},
activeColor: const Color.fromRGBO(117, 98, 249, 1),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
),
SizedBox(
height: 32.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"欺诈/广告/引导第三方交易",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500
),
),
Checkbox(
value: checked == 1,
onChanged: (value) {
checked = 1;
},
activeColor: const Color.fromRGBO(117, 98, 249, 1),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
),
SizedBox(
height: 32.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"恶意骚扰/侮辱谩骂",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500
),
),
Checkbox(
value: checked == 1,
onChanged: (value) {
checked = 1;
},
activeColor: const Color.fromRGBO(117, 98, 249, 1),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
),
SizedBox(
height: 32.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"其他",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500
),
),
Checkbox(
value: checked == 1,
onChanged: (value) {
checked = 1;
},
activeColor: const Color.fromRGBO(117, 98, 249, 1),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
),
SizedBox(height: 29.w ,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"图片证据(选填)",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
),
],
),
SizedBox(height: 13.w ,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
width: 80.w,
height: 80.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8.w)),
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1))
),
child: Center(
child: Icon(
Icons.add,
size: 13.w,
color: const Color.fromRGBO(144, 144, 144, 1),
),
),
)
],
),
SizedBox(height: 15.w ,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"投诉内容(选填)",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
),
],
),
Container(
padding: EdgeInsets.all(17.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8.w)),
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1))
),
child: TextField(
controller: _messageController,
minLines: 3, // 多行
maxLines: 3, // 自适应高度
style: TextStyle(
fontSize: ScreenUtil().setWidth(12),
height: 1
),
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(
vertical: 0,
horizontal: 0
),
hintText: "请告诉您举报的具体原因,以便更快处理",
border: const OutlineInputBorder(
borderSide: BorderSide.none, // 这将移除边框 // 可选:设置圆角
),
// 如果你希望聚焦时和未聚焦时都没有边框,也可以设置 focusedBorder 和 enabledBorder
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(4.0)),
),
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(4.0)),
),
),
onChanged: (value){
message = value;
},
),
),
SizedBox(height: 16.w ,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"同时加入黑名单",
style: TextStyle(
fontSize: 13.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;
},
),
],
),
SizedBox(height: 53.w ,),
Container(
width: 325.w,
height: 45.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(45.w)),
color: Color.fromRGBO(117, 98, 249, checked != 0 ? 1 : .6)
),
child: Center(
child: Text(
"提交",
style: TextStyle(
fontSize: 18.w,
color: Colors.white,
fontWeight: FontWeight.w500
),
),
),
)
],
),
),
),
);
}
}