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.
443 lines
16 KiB
443 lines
16 KiB
import 'package:dating_touchme_app/components/page_appbar.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:roundcheckbox/roundcheckbox.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: 12.w,
|
|
right: 20.w,
|
|
left: 40.w
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
"请选择举报的原因",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(144, 144, 144, 1)
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 19.w ,),
|
|
SizedBox(
|
|
height: 65.w,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"资料作假",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
RoundCheckBox(
|
|
onTap: (bool? value){
|
|
checked = 1;
|
|
setState(() {
|
|
|
|
});
|
|
},
|
|
isChecked: checked == 1,
|
|
size: ScreenUtil().setWidth(36),
|
|
checkedColor: const Color.fromRGBO(117, 98, 249, 1),
|
|
checkedWidget: Icon(
|
|
Icons.check,
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
size: ScreenUtil().setWidth(15),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 65.w,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"色情低俗",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
RoundCheckBox(
|
|
onTap: (bool? value){
|
|
checked = 2;
|
|
setState(() {
|
|
|
|
});
|
|
},
|
|
isChecked: checked == 2,
|
|
size: ScreenUtil().setWidth(36),
|
|
checkedColor: const Color.fromRGBO(117, 98, 249, 1),
|
|
checkedWidget: Icon(
|
|
Icons.check,
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
size: ScreenUtil().setWidth(15),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 65.w,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"涉政/涉独",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
RoundCheckBox(
|
|
onTap: (bool? value){
|
|
checked = 3;
|
|
setState(() {
|
|
|
|
});
|
|
},
|
|
isChecked: checked == 3,
|
|
size: ScreenUtil().setWidth(36),
|
|
checkedColor: const Color.fromRGBO(117, 98, 249, 1),
|
|
checkedWidget: Icon(
|
|
Icons.check,
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
size: ScreenUtil().setWidth(15),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 65.w,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"违法违禁",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
RoundCheckBox(
|
|
onTap: (bool? value){
|
|
checked = 4;
|
|
setState(() {
|
|
|
|
});
|
|
},
|
|
isChecked: checked == 4,
|
|
size: ScreenUtil().setWidth(36),
|
|
checkedColor: const Color.fromRGBO(117, 98, 249, 1),
|
|
checkedWidget: Icon(
|
|
Icons.check,
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
size: ScreenUtil().setWidth(15),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 65.w,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"未成年相关",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
RoundCheckBox(
|
|
onTap: (bool? value){
|
|
checked = 5;
|
|
setState(() {
|
|
|
|
});
|
|
},
|
|
isChecked: checked == 5,
|
|
size: ScreenUtil().setWidth(36),
|
|
checkedColor: const Color.fromRGBO(117, 98, 249, 1),
|
|
checkedWidget: Icon(
|
|
Icons.check,
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
size: ScreenUtil().setWidth(15),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 65.w,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"欺诈/广告/引导第三方交易",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
RoundCheckBox(
|
|
onTap: (bool? value){
|
|
checked = 6;
|
|
setState(() {
|
|
|
|
});
|
|
},
|
|
isChecked: checked == 6,
|
|
size: ScreenUtil().setWidth(36),
|
|
checkedColor: const Color.fromRGBO(117, 98, 249, 1),
|
|
checkedWidget: Icon(
|
|
Icons.check,
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
size: ScreenUtil().setWidth(15),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 65.w,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"恶意骚扰/侮辱谩骂",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
RoundCheckBox(
|
|
onTap: (bool? value){
|
|
checked = 7;
|
|
setState(() {
|
|
|
|
});
|
|
},
|
|
isChecked: checked == 7,
|
|
size: ScreenUtil().setWidth(36),
|
|
checkedColor: const Color.fromRGBO(117, 98, 249, 1),
|
|
checkedWidget: Icon(
|
|
Icons.check,
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
size: ScreenUtil().setWidth(15),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 65.w,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
"其他",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
RoundCheckBox(
|
|
onTap: (bool? value){
|
|
checked = 8;
|
|
setState(() {
|
|
|
|
});
|
|
},
|
|
isChecked: checked == 8,
|
|
size: ScreenUtil().setWidth(36),
|
|
checkedColor: const Color.fromRGBO(117, 98, 249, 1),
|
|
checkedWidget: Icon(
|
|
Icons.check,
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
size: ScreenUtil().setWidth(15),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 58.w ,),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
"图片证据(选填)",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(144, 144, 144, 1)
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 26.w ,),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
width: 160.w,
|
|
height: 160.w,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(16.w)),
|
|
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1))
|
|
),
|
|
child: Center(
|
|
child: Icon(
|
|
Icons.add,
|
|
size: 26.w,
|
|
color: const Color.fromRGBO(144, 144, 144, 1),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
SizedBox(height: 30.w ,),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
"投诉内容(选填)",
|
|
style: TextStyle(
|
|
fontSize: 26.w,
|
|
color: const Color.fromRGBO(144, 144, 144, 1)
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Container(
|
|
padding: EdgeInsets.all(35.w),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(16.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(26),
|
|
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(8.0)),
|
|
),
|
|
enabledBorder: const OutlineInputBorder(
|
|
borderSide: BorderSide.none,
|
|
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
|
),
|
|
),
|
|
onChanged: (value){
|
|
message = value;
|
|
},
|
|
),
|
|
),
|
|
SizedBox(height: 32.w ,),
|
|
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;
|
|
},
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 107.w ,),
|
|
Container(
|
|
width: 650.w,
|
|
height: 90.w,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(90.w)),
|
|
color: Color.fromRGBO(117, 98, 249, checked != 0 ? 1 : .6)
|
|
),
|
|
child: Center(
|
|
child: Text(
|
|
"提交",
|
|
style: TextStyle(
|
|
fontSize: 36.w,
|
|
color: Colors.white,
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|