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.
195 lines
6.3 KiB
195 lines
6.3 KiB
import 'dart:ui'; |
|
|
|
import 'package:flutter/material.dart'; |
|
import 'package:flutter/rendering.dart'; |
|
import 'package:huixiang/retrofit/retrofit_api.dart'; |
|
import 'package:huixiang/utils/font_weight.dart'; |
|
import 'package:huixiang/view_widget/my_appbar.dart'; |
|
import 'package:flutter/cupertino.dart'; |
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
class ReportPage extends StatefulWidget { |
|
final Map<String, dynamic> arguments; |
|
|
|
ReportPage({this.arguments}); |
|
|
|
@override |
|
State<StatefulWidget> createState() { |
|
return _ReportPage(); |
|
} |
|
} |
|
|
|
class _ReportPage extends State<ReportPage> { |
|
ApiService apiService; |
|
int checkIndex = 0; |
|
|
|
@override |
|
void initState() { |
|
super.initState(); |
|
} |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
return Scaffold( |
|
appBar: MyAppBar( |
|
background: Color(0xFFFFFFFFF), |
|
leadingColor: Colors.black, |
|
title: "举报", |
|
titleSize: 18, |
|
titleColor: Colors.black, |
|
), |
|
body: Container( |
|
height: double.infinity, |
|
color: Color(0xFFFFFFFF), |
|
child: Stack( |
|
children: [ |
|
SingleChildScrollView( |
|
physics: BouncingScrollPhysics(), |
|
child: Column( |
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
children: [ |
|
Container( |
|
width: double.infinity, |
|
color: Color(0XFFFFFFFF), |
|
padding: EdgeInsets.only(bottom: 4, left: 16, right: 16), |
|
child: Text.rich( |
|
TextSpan( |
|
children: [ |
|
TextSpan( |
|
text: "举报", |
|
style: TextStyle( |
|
fontSize: 16.sp, |
|
fontWeight: MyFontWeight.medium, |
|
color: Color(0xFF1A1A1A), |
|
), |
|
), |
|
TextSpan( |
|
text: "@百花谷", |
|
style: TextStyle( |
|
fontSize: 16.sp, |
|
fontWeight: MyFontWeight.medium, |
|
color: Color(0xFF319E5F), |
|
), |
|
), |
|
TextSpan( |
|
text: "的动态", |
|
style: TextStyle( |
|
fontSize: 16.sp, |
|
fontWeight: MyFontWeight.medium, |
|
color: Color(0xFF1A1A1A), |
|
), |
|
), |
|
], |
|
), |
|
), |
|
), |
|
report(), |
|
], |
|
), |
|
), |
|
Align( |
|
alignment: Alignment.bottomCenter, |
|
child: Container( |
|
width: double.infinity, |
|
height:95, |
|
child: Column( |
|
children: [ |
|
GestureDetector( |
|
onTap: () { |
|
Navigator.of(context) |
|
.pushNamed('/router/report_notice'); |
|
}, |
|
child: Container( |
|
alignment: Alignment.bottomCenter, |
|
margin: EdgeInsets.only(bottom:25), |
|
child: Text( |
|
"投诉须知", |
|
style: TextStyle( |
|
fontSize: 14.sp, |
|
fontWeight: MyFontWeight.regular, |
|
color: Color(0xFF3C425C), |
|
), |
|
), |
|
)), |
|
Expanded(child: |
|
GestureDetector( |
|
onTap: (){ |
|
Navigator.of(context) |
|
.pushNamed('/router/report_success'); |
|
}, |
|
child: Container( |
|
width: double.infinity, |
|
height:double.infinity, |
|
color: Color(0xFF319E5F), |
|
alignment: Alignment.center, |
|
child: Text( |
|
"提交", |
|
style: TextStyle( |
|
fontSize: 16.sp, |
|
fontWeight: MyFontWeight.semi_bold, |
|
color: Color(0xFFFFFFFF), |
|
), |
|
), |
|
),)) |
|
], |
|
), |
|
)) |
|
], |
|
), |
|
), |
|
); |
|
} |
|
|
|
Widget report() { |
|
return Container( |
|
padding: EdgeInsets.only(left: 16, right: 16), |
|
child: |
|
// (articles == null || articles.length == 0) |
|
// ? NoDataView( |
|
// src: "assets/image/dong_tai.png", |
|
// isShowBtn: false, |
|
// text: "目前暂无发布动态,要把开心的事讲出来哦~", |
|
// fontSize: 16.sp, |
|
// margin: EdgeInsets.only(left: 60.w, right: 60.w), |
|
// ) : |
|
ListView.builder( |
|
physics: BouncingScrollPhysics(), |
|
shrinkWrap: true, |
|
itemBuilder: (context, position) { |
|
return GestureDetector( |
|
onTap: () {}, |
|
child: reportList(), |
|
); |
|
}, |
|
itemCount: 9, |
|
), |
|
); |
|
} |
|
|
|
Widget reportList() { |
|
return Container( |
|
padding: EdgeInsets.only(top: 18, bottom: 20), |
|
color: Color(0xFFFFFFFF), |
|
child: Row( |
|
children: [ |
|
Image.asset( |
|
"assets/image/icon_radio_unselected.png", |
|
width: 16, |
|
height: 16, |
|
), |
|
SizedBox( |
|
width: 8, |
|
), |
|
Expanded( |
|
child: Text( |
|
"色情低俗", |
|
style: TextStyle( |
|
color: Color(0xFF353535), |
|
fontSize: 14.sp, |
|
fontWeight: MyFontWeight.regular), |
|
)) |
|
], |
|
)); |
|
} |
|
}
|
|
|