绑定邮箱 意见反馈 注销账号 举报 看大图 增加七牛云sdk
This commit is contained in:
parent
13d35dc640
commit
2312ab7084
BIN
circle_app/assets/images/mine/icon_block.png
Normal file
BIN
circle_app/assets/images/mine/icon_block.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
circle_app/assets/images/mine/icon_dialog_black.png
Normal file
BIN
circle_app/assets/images/mine/icon_dialog_black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
circle_app/assets/images/mine/icon_report.png
Normal file
BIN
circle_app/assets/images/mine/icon_report.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
@ -25,7 +25,7 @@ class AccountPage extends StatelessWidget {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(
|
appBar: MyAppBar(
|
||||||
centerTitle: '设置',
|
centerTitle: '账号中心',
|
||||||
),
|
),
|
||||||
body: Scaffold(
|
body: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
@ -53,35 +53,39 @@ class AccountPage extends StatelessWidget {
|
|||||||
// ],
|
// ],
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
|
GestureDetector(
|
||||||
// Container(
|
onTap: () {
|
||||||
// margin: EdgeInsets.only(top: 16.0),
|
Get.toNamed(AppRoutes.PhotoActivity);
|
||||||
// child: Row(
|
},
|
||||||
// children: [
|
child: Container(
|
||||||
// Text(
|
margin: EdgeInsets.only(top: 16.0),
|
||||||
// "换绑手机号",
|
child: Row(
|
||||||
// style: TextStyle(
|
children: [
|
||||||
// color: Color(0xFFF7FAFA),
|
Text(
|
||||||
// fontSize: 16.0,
|
"换绑手机号",
|
||||||
// ),
|
style: TextStyle(
|
||||||
// ),
|
color: Color(0xFFF7FAFA),
|
||||||
// Spacer(),
|
fontSize: 16.0,
|
||||||
// Text(
|
),
|
||||||
// "16677778888",
|
),
|
||||||
// style: TextStyle(
|
Spacer(),
|
||||||
// color: Color(0xFFB7BECC),
|
Text(
|
||||||
// fontSize: 16.0,
|
"16677778888",
|
||||||
// ),
|
style: TextStyle(
|
||||||
// ),
|
color: Color(0xFFB7BECC),
|
||||||
// SizedBox(width: 8.0),
|
fontSize: 16.0,
|
||||||
// Image.asset(
|
),
|
||||||
// getHomeImage("icon_in"),
|
),
|
||||||
// width: 24.0,
|
SizedBox(width: 8.0),
|
||||||
// height: 24.0,
|
Image.asset(
|
||||||
// ),
|
getHomeImage("icon_in"),
|
||||||
// ],
|
width: 24.0,
|
||||||
// ),
|
height: 24.0,
|
||||||
// ),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
// Container(
|
// Container(
|
||||||
// margin: EdgeInsets.only(top: 16.0),
|
// margin: EdgeInsets.only(top: 16.0),
|
||||||
// child: Row(
|
// child: Row(
|
||||||
@ -102,149 +106,160 @@ class AccountPage extends StatelessWidget {
|
|||||||
// ],
|
// ],
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: (){
|
||||||
|
Get.toNamed(AppRoutes.OffAccountActivity);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 16.0),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"注销账号",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFF7FAFA),
|
||||||
|
fontSize: 16.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
Image.asset(
|
||||||
|
getHomeImage("icon_in"),
|
||||||
|
width: 24.0,
|
||||||
|
height: 24.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
) ,)
|
||||||
|
,
|
||||||
// Container(
|
// Container(
|
||||||
// margin: EdgeInsets.only(top: 16.0),
|
// margin: EdgeInsets.only(top: 0.0.sp, left: 0.sp),
|
||||||
|
// child: Text(
|
||||||
|
// "账号绑定",
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: Color(0xFFF7FAFA),
|
||||||
|
// fontSize: 16.0.sp,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// margin: EdgeInsets.only(top: 16.0.sp),
|
||||||
// child: Row(
|
// child: Row(
|
||||||
// children: [
|
// children: [
|
||||||
// Text(
|
// Text(
|
||||||
// "注销账号",
|
// "已绑定手机号",
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// color: Color(0xFFF7FAFA),
|
// color: Color(0xFFB7BECC),
|
||||||
// fontSize: 16.0,
|
// fontSize: 16.0.sp,
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// Spacer(),
|
// Spacer(),
|
||||||
// Image.asset(
|
// Container(
|
||||||
// getHomeImage("icon_in"),
|
// alignment: Alignment.center,
|
||||||
// width: 24.0,
|
// width: 60.sp,
|
||||||
// height: 24.0,
|
// height: 28.sp,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(14.0.sp),
|
||||||
|
// border: Border.all(
|
||||||
|
// width: 0.4.sp,
|
||||||
|
// color: Colors.white,
|
||||||
// ),
|
// ),
|
||||||
|
// ),
|
||||||
|
// child: GestureDetector(
|
||||||
|
// onTap: (){
|
||||||
|
// Get.toNamed(AppRoutes.PhotoActivity);
|
||||||
|
// },
|
||||||
|
// child:Text(
|
||||||
|
// "换绑",
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: Color(0xFFB7BECC),
|
||||||
|
// fontSize: 14.0.sp,
|
||||||
|
// ),
|
||||||
|
// )) ,)
|
||||||
// ],
|
// ],
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
Container(
|
// Container(
|
||||||
margin: EdgeInsets.only(top: 0.0.sp, left: 16.0.sp),
|
// margin: EdgeInsets.only(top: 16.0.sp),
|
||||||
child: Text(
|
// child: Row(
|
||||||
"账号绑定",
|
// children: [
|
||||||
style: TextStyle(
|
// Text(
|
||||||
color: Color(0xFFF7FAFA),
|
// "微信",
|
||||||
fontSize: 16.0.sp,
|
// style: TextStyle(
|
||||||
),
|
// color: Color(0xFFB7BECC),
|
||||||
),
|
// fontSize: 16.0.sp,
|
||||||
),
|
// ),
|
||||||
Container(
|
// ),
|
||||||
margin: EdgeInsets.only(top: 16.0.sp),
|
// Spacer(),
|
||||||
child: Row(
|
// Container(
|
||||||
children: [
|
// alignment: Alignment.center,
|
||||||
Text(
|
// width: 60.sp,
|
||||||
"已绑定手机号",
|
// height: 28.sp,
|
||||||
style: TextStyle(
|
// decoration: BoxDecoration(
|
||||||
color: Color(0xFFB7BECC),
|
// borderRadius: BorderRadius.circular(14.0.sp),
|
||||||
fontSize: 16.0.sp,
|
// border: Border.all(
|
||||||
),
|
// width: 0.4.sp,
|
||||||
),
|
// color: Colors.white,
|
||||||
Spacer(),
|
// ),
|
||||||
Container(
|
// ),
|
||||||
alignment: Alignment.center,
|
// child: Text(
|
||||||
width: 60.sp,
|
// "去绑定",
|
||||||
height: 28.sp,
|
// style: TextStyle(
|
||||||
decoration: BoxDecoration(
|
// color: Color(0xFFB7BECC),
|
||||||
borderRadius: BorderRadius.circular(14.0.sp),
|
// fontSize: 14.0.sp,
|
||||||
border: Border.all(
|
// ),
|
||||||
width: 0.4.sp,
|
// )),
|
||||||
color: Colors.white,
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: GestureDetector(
|
// Container(
|
||||||
onTap: (){
|
// margin: EdgeInsets.only(top: 16.0.sp),
|
||||||
Get.toNamed(AppRoutes.PhotoActivity);
|
// child: Row(
|
||||||
},
|
// children: [
|
||||||
child:Text(
|
// Text(
|
||||||
"换绑",
|
// "邮箱",
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Color(0xFFB7BECC),
|
// color: Color(0xFFB7BECC),
|
||||||
fontSize: 14.0.sp,
|
// fontSize: 16.0.sp,
|
||||||
),
|
// ),
|
||||||
)) ,)
|
// ),
|
||||||
],
|
// Spacer(),
|
||||||
),
|
// GestureDetector(
|
||||||
),
|
// onTap: (){
|
||||||
Container(
|
// Get.toNamed(AppRoutes.BindMailActivity);
|
||||||
margin: EdgeInsets.only(top: 16.0.sp),
|
// },
|
||||||
child: Row(
|
// child: Container(
|
||||||
children: [
|
// alignment: Alignment.center,
|
||||||
Text(
|
// width: 60.sp,
|
||||||
"微信",
|
// height: 28.sp,
|
||||||
style: TextStyle(
|
// decoration: BoxDecoration(
|
||||||
color: Color(0xFFB7BECC),
|
// borderRadius: BorderRadius.circular(14.0.sp),
|
||||||
fontSize: 16.0.sp,
|
// border: Border.all(
|
||||||
),
|
// width: 0.4.sp,
|
||||||
),
|
// color: Colors.white,
|
||||||
Spacer(),
|
// ),
|
||||||
Container(
|
// ),
|
||||||
alignment: Alignment.center,
|
// child: Text(
|
||||||
width: 60.sp,
|
// "去绑定",
|
||||||
height: 28.sp,
|
// style: TextStyle(
|
||||||
decoration: BoxDecoration(
|
// color: Color(0xFFB7BECC),
|
||||||
borderRadius: BorderRadius.circular(14.0.sp),
|
// fontSize: 14.0.sp,
|
||||||
border: Border.all(
|
// ),
|
||||||
width: 0.4.sp,
|
// )),)
|
||||||
color: Colors.white,
|
//
|
||||||
),
|
// ],
|
||||||
),
|
// ),
|
||||||
child: Text(
|
// ),
|
||||||
"去绑定",
|
// Container(
|
||||||
style: TextStyle(
|
// margin: EdgeInsets.only(top: 16.0.sp),
|
||||||
color: Color(0xFFB7BECC),
|
// child: Text(
|
||||||
fontSize: 14.0.sp,
|
// "温馨提示:完成账号绑定后,手机丢失或忘记密码也可以通过其他方式登录",
|
||||||
),
|
// style: TextStyle(
|
||||||
)),
|
// color: Color(0xFFB7BECC),
|
||||||
],
|
// fontSize: 12.0.sp,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Container(
|
// ),
|
||||||
margin: EdgeInsets.only(top: 16.0.sp),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"邮箱",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFFB7BECC),
|
|
||||||
fontSize: 16.0.sp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Spacer(),
|
|
||||||
Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
width: 60.sp,
|
|
||||||
height: 28.sp,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(14.0.sp),
|
|
||||||
border: Border.all(
|
|
||||||
width: 0.4.sp,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
"去绑定",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFFB7BECC),
|
|
||||||
fontSize: 14.0.sp,
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 16.0.sp),
|
|
||||||
child: Text(
|
|
||||||
"温馨提示:完成账号绑定后,手机丢失或忘记密码也可以通过其他方式登录",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFFB7BECC),
|
|
||||||
fontSize: 12.0.sp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
top: 40.0.sp, left: 72.0.sp, right: 72.0.sp),
|
top: 40.0.sp, left: 72.0.sp, right: 72.0.sp),
|
||||||
|
|||||||
10
circle_app/lib/app/bindmail/binding.dart
Normal file
10
circle_app/lib/app/bindmail/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class BindmailBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => BindmailLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
7
circle_app/lib/app/bindmail/logic.dart
Normal file
7
circle_app/lib/app/bindmail/logic.dart
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'state.dart';
|
||||||
|
|
||||||
|
class BindmailLogic extends GetxController {
|
||||||
|
final BindmailState state = BindmailState();
|
||||||
|
}
|
||||||
5
circle_app/lib/app/bindmail/state.dart
Normal file
5
circle_app/lib/app/bindmail/state.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class BindmailState {
|
||||||
|
BindmailState() {
|
||||||
|
///Initialize variables
|
||||||
|
}
|
||||||
|
}
|
||||||
208
circle_app/lib/app/bindmail/view.dart
Normal file
208
circle_app/lib/app/bindmail/view.dart
Normal file
@ -0,0 +1,208 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../components/my_app_bar.dart';
|
||||||
|
import '../../util/util.dart';
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class BindmailPage extends StatefulWidget {
|
||||||
|
BindmailPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_BindmailPageState createState() => _BindmailPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _BindmailPageState extends State<BindmailPage> {
|
||||||
|
int _countdownSeconds = 60;
|
||||||
|
bool _isCountingDown = false;
|
||||||
|
Timer? _timer;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_timer?.cancel();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startCountdown() {
|
||||||
|
setState(() {
|
||||||
|
_isCountingDown = true;
|
||||||
|
_countdownSeconds = 60;
|
||||||
|
});
|
||||||
|
|
||||||
|
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
|
||||||
|
setState(() {
|
||||||
|
if (_countdownSeconds > 0) {
|
||||||
|
_countdownSeconds--;
|
||||||
|
} else {
|
||||||
|
_isCountingDown = false;
|
||||||
|
_timer?.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: MyAppBar(
|
||||||
|
centerTitle: '绑定邮箱',
|
||||||
|
),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// Existing code...
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 16.0.sp,
|
||||||
|
top: 16.0.sp,
|
||||||
|
right: 16.0.sp,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4.0.sp),
|
||||||
|
color: Color(0xff282733),
|
||||||
|
),
|
||||||
|
height: 40.0.sp,
|
||||||
|
child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
padding: EdgeInsets.only(left: 16.0.sp, right: 10.sp),
|
||||||
|
child: Text(
|
||||||
|
" 邮箱 ",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.0.sp,
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
height: 32.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: TextField(
|
||||||
|
textAlignVertical: TextAlignVertical.center,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: "请输入邮箱",
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Colors.grey.shade300,
|
||||||
|
fontSize: 14.0,
|
||||||
|
),
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.0,
|
||||||
|
height: 1.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
flex: 4,
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(
|
||||||
|
16.0.sp, 20.0.sp, 8.0.sp, 0.0.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4.0.sp),
|
||||||
|
color: Color(0xff282733),
|
||||||
|
),
|
||||||
|
height: 40.0.sp,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 10.0.sp, right: 10.sp),
|
||||||
|
child: Text(
|
||||||
|
"验证码",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
height: 32.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: TextField(
|
||||||
|
textAlignVertical:
|
||||||
|
TextAlignVertical.center,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: "请输入验证码",
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Colors.grey.shade300,
|
||||||
|
fontSize: 14.0,
|
||||||
|
),
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.0,
|
||||||
|
height: 1.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 2,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (!_isCountingDown) {
|
||||||
|
// Only start countdown if not already counting down
|
||||||
|
startCountdown();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(
|
||||||
|
8.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4.0.sp),
|
||||||
|
color: Color(0xff282733),
|
||||||
|
),
|
||||||
|
height: 40.0.sp,
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
_isCountingDown
|
||||||
|
? '$_countdownSeconds 秒'
|
||||||
|
: '获取验证码',
|
||||||
|
style: TextStyle(
|
||||||
|
color: _isCountingDown
|
||||||
|
? Colors.grey.shade400
|
||||||
|
: Colors.white,
|
||||||
|
fontSize: 14.0.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
// Existing code...
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
10
circle_app/lib/app/feedback/binding.dart
Normal file
10
circle_app/lib/app/feedback/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class FeedbackBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => FeedbackLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
40
circle_app/lib/app/feedback/logic.dart
Normal file
40
circle_app/lib/app/feedback/logic.dart
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart';
|
||||||
|
|
||||||
|
import 'state.dart';
|
||||||
|
|
||||||
|
class FeedbackLogic extends GetxController {
|
||||||
|
final FeedbackState state = FeedbackState();
|
||||||
|
|
||||||
|
final ImagePicker _picker = ImagePicker();
|
||||||
|
var storage = Storage();
|
||||||
|
|
||||||
|
Future getImageFile() async {
|
||||||
|
try {
|
||||||
|
final XFile? pickedFile = await _picker.pickImage(
|
||||||
|
source: ImageSource.gallery,
|
||||||
|
);
|
||||||
|
_setImageFileListFromFile(pickedFile!);
|
||||||
|
// setState(() {
|
||||||
|
// _setImageFileListFromFile(pickedFile);
|
||||||
|
// });
|
||||||
|
} catch (e) {
|
||||||
|
// setState(() {
|
||||||
|
// _pickImageError = e;
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _setImageFileListFromFile(XFile pickedFile) {
|
||||||
|
PutController putController = PutController();
|
||||||
|
|
||||||
|
// 添加任务状态监听
|
||||||
|
putController.addStatusListener((StorageStatus status) {
|
||||||
|
print('状态变化: 当前任务状态:$status');
|
||||||
|
});
|
||||||
|
storage.putFile(File(pickedFile.path), "",options: PutOptions(controller: putController));
|
||||||
|
}
|
||||||
|
}
|
||||||
5
circle_app/lib/app/feedback/state.dart
Normal file
5
circle_app/lib/app/feedback/state.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class FeedbackState {
|
||||||
|
FeedbackState() {
|
||||||
|
///Initialize variables
|
||||||
|
}
|
||||||
|
}
|
||||||
131
circle_app/lib/app/feedback/view.dart
Normal file
131
circle_app/lib/app/feedback/view.dart
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../components/my_app_bar.dart';
|
||||||
|
import '../../util/util.dart';
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class FeedbackPage extends StatelessWidget {
|
||||||
|
FeedbackPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
final logic = Get.find<FeedbackLogic>();
|
||||||
|
final state = Get
|
||||||
|
.find<FeedbackLogic>()
|
||||||
|
.state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder(builder: (FeedbackLogic controller){
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: MyAppBar(
|
||||||
|
centerTitle: '意见反馈',
|
||||||
|
),
|
||||||
|
body: SingleChildScrollView(child: SafeArea(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 200,
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(13),
|
||||||
|
color: Color(
|
||||||
|
0xFF4C3E5F), // Use your desired background color
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(13),
|
||||||
|
child: TextField(
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: '请补充详细问题和意见,我们会认真看完的哦~',
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Color(0xFFB7BECC), fontSize: 14.sp),
|
||||||
|
border: InputBorder.none,
|
||||||
|
|
||||||
|
),
|
||||||
|
maxLines: null,
|
||||||
|
maxLength: 200,
|
||||||
|
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(200),
|
||||||
|
],
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 120.sp,
|
||||||
|
margin: EdgeInsets.only(left: 16.sp,right: 16.sp),
|
||||||
|
child: GridView.builder(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 3, // 每行显示的项目数量
|
||||||
|
),
|
||||||
|
itemCount: 4, // Replace with your item count
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
if (index == 0) {
|
||||||
|
// 第一个项目,显示固定的图片
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.getImageFile();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getMineImage("icon_img_add")),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// 后续项目,根据接口获取数据
|
||||||
|
// 假设通过接口获取到的数据存储在一个名为 data 的列表中
|
||||||
|
// var itemData = data[index - 1]; // 减去第一个固定图片的索引
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Center(
|
||||||
|
// child: _buildImageItem(
|
||||||
|
// 'https://book.flutterchina.club/assets/img/logo.png'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 16, top: 10),
|
||||||
|
child: Text(
|
||||||
|
'最多选择3张图片',
|
||||||
|
style: TextStyle(color: Color(0xFFB7BECC), fontSize: 12),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 50),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 72),
|
||||||
|
height: 42,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(21),
|
||||||
|
color: Color(0xFF21BEAB),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'提交',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 16),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),)
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../components/my_app_bar.dart';
|
import '../../components/my_app_bar.dart';
|
||||||
|
import '../../router/app_routers.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
@ -28,13 +29,13 @@ class HelpPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 30.sp),
|
padding: EdgeInsets.only(top: 30.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'04-10 19:50',
|
'04-10 19:51',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFB7BECC),
|
color: Color(0xFFB7BECC),
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
@ -47,7 +48,17 @@ class HelpPage extends StatelessWidget {
|
|||||||
padding: EdgeInsets.only(left: 16.sp, right: 16.sp),
|
padding: EdgeInsets.only(left: 16.sp, right: 16.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(getMineImage("im_feedback"),width: 32.sp,height: 32.sp,),
|
Container(
|
||||||
|
height: 200.sp,
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.topCenter,
|
||||||
|
child: Image.asset(
|
||||||
|
getMineImage("im_feedback"),
|
||||||
|
width: 32.sp,
|
||||||
|
height: 32.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
SizedBox(width: 8.sp),
|
SizedBox(width: 8.sp),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -91,9 +102,14 @@ class HelpPage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
TextButton.icon(
|
TextButton.icon(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
Get.toNamed(AppRoutes.FeedbackActivity);
|
||||||
// Handle feedback button press
|
// Handle feedback button press
|
||||||
},
|
},
|
||||||
icon: Image.asset(getMineImage("im_feedback_write"),width: 14.sp,height: 14.sp,),
|
icon: Image.asset(
|
||||||
|
getMineImage("im_feedback_write"),
|
||||||
|
width: 14.sp,
|
||||||
|
height: 14.sp,
|
||||||
|
),
|
||||||
label: Text(
|
label: Text(
|
||||||
'意见反馈',
|
'意见反馈',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -103,18 +119,23 @@ class HelpPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
backgroundColor: Color(0xFF21BEAB),
|
backgroundColor: Color(0xFF21BEAB),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.sp, vertical: 4.sp),
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 16.sp, vertical: 4.sp),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(20.sp),
|
borderRadius: BorderRadius.circular(20.sp),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 10),
|
SizedBox(width: 20),
|
||||||
TextButton.icon(
|
TextButton.icon(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// Handle contact service button press
|
// Handle contact service button press
|
||||||
},
|
},
|
||||||
icon: Image.asset(getMineImage("im_service"),width: 14.sp,height: 14.sp,),
|
icon: Image.asset(
|
||||||
|
getMineImage("im_service"),
|
||||||
|
width: 14.sp,
|
||||||
|
height: 14.sp,
|
||||||
|
),
|
||||||
label: Text(
|
label: Text(
|
||||||
'联系客服',
|
'联系客服',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -124,7 +145,8 @@ class HelpPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
backgroundColor: Color(0xFF21BEAB),
|
backgroundColor: Color(0xFF21BEAB),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.sp, vertical: 4.sp),
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 16.sp, vertical: 4.sp),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(20.sp),
|
borderRadius: BorderRadius.circular(20.sp),
|
||||||
),
|
),
|
||||||
@ -139,7 +161,4 @@ class HelpPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import 'state.dart';
|
|||||||
class Complete_materialLogic extends GetxController {
|
class Complete_materialLogic extends GetxController {
|
||||||
final Complete_materialState state = Complete_materialState();
|
final Complete_materialState state = Complete_materialState();
|
||||||
final ImagePicker _picker = ImagePicker();
|
final ImagePicker _picker = ImagePicker();
|
||||||
|
var type = Get.arguments ?? "";
|
||||||
Future getImageFile() async {
|
Future getImageFile() async {
|
||||||
try {
|
try {
|
||||||
final XFile? pickedFile = await _picker.pickImage(
|
final XFile? pickedFile = await _picker.pickImage(
|
||||||
|
|||||||
@ -18,6 +18,7 @@ class Complete_materialPage extends StatelessWidget {
|
|||||||
// PickerStyle pickerStyle = PickerStyle();
|
// PickerStyle pickerStyle = PickerStyle();
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return GetBuilder(builder: (Complete_materialLogic controller) {
|
return GetBuilder(builder: (Complete_materialLogic controller) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
@ -179,7 +180,12 @@ class Complete_materialPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if(controller.type=="user"){
|
||||||
|
Navigator.pop(context);
|
||||||
|
}else{
|
||||||
controller.pushHome();
|
controller.pushHome();
|
||||||
|
}
|
||||||
|
|
||||||
// controller.checkInfo();
|
// controller.checkInfo();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -192,7 +198,7 @@ class Complete_materialPage extends StatelessWidget {
|
|||||||
image: AssetImage(getLoginImage('start_bg'))),
|
image: AssetImage(getLoginImage('start_bg'))),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'开启小圈之旅',
|
controller.type=="user"? "完成" : '开启小圈之旅',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xff00FFF4),
|
color: Color(0xff00FFF4),
|
||||||
fontSize: 16.sp,
|
fontSize: 16.sp,
|
||||||
@ -211,6 +217,7 @@ class Complete_materialPage extends StatelessWidget {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget funcWidget(
|
Widget funcWidget(
|
||||||
String leftStr, Widget tipWidget, GestureTapCallback callback,
|
String leftStr, Widget tipWidget, GestureTapCallback callback,
|
||||||
{String img = 'down_arr'}) {
|
{String img = 'down_arr'}) {
|
||||||
|
|||||||
@ -64,7 +64,6 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.SetUpActivity);
|
Get.toNamed(AppRoutes.SetUpActivity);
|
||||||
// controller.state.hearUrl
|
// controller.state.hearUrl
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
@ -107,7 +106,6 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.HelpActivity);
|
Get.toNamed(AppRoutes.HelpActivity);
|
||||||
// controller.state.hearUrl
|
// controller.state.hearUrl
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: 18),
|
margin: EdgeInsets.only(top: 18),
|
||||||
@ -336,8 +334,6 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -381,9 +377,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
return ClipOval(
|
return ClipOval(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// controller.state.hearUrl =
|
// Get.toNamed(AppRoutes.Swiper,arguments:imgList);
|
||||||
// 'https://book.flutterchina.club/assets/img/logo.png';
|
|
||||||
// controller.update();
|
|
||||||
},
|
},
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
'https://book.flutterchina.club/assets/img/logo.png',
|
'https://book.flutterchina.club/assets/img/logo.png',
|
||||||
@ -391,8 +385,8 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
height: 65,
|
height: 65,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
|
||||||
|
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildNameRow() {
|
Widget _buildNameRow() {
|
||||||
|
|||||||
10
circle_app/lib/app/offaccount/binding.dart
Normal file
10
circle_app/lib/app/offaccount/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class OffaccountBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => OffaccountLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
10
circle_app/lib/app/offaccount/logic.dart
Normal file
10
circle_app/lib/app/offaccount/logic.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'state.dart';
|
||||||
|
|
||||||
|
class OffaccountLogic extends GetxController {
|
||||||
|
final OffaccountState state = OffaccountState();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
12
circle_app/lib/app/offaccount/state.dart
Normal file
12
circle_app/lib/app/offaccount/state.dart
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class OffaccountState {
|
||||||
|
OffaccountState() {
|
||||||
|
///Initialize variables
|
||||||
|
}
|
||||||
|
|
||||||
|
String offReasonMsg = "请选择";
|
||||||
|
TextEditingController photoController = TextEditingController();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
322
circle_app/lib/app/offaccount/view.dart
Normal file
322
circle_app/lib/app/offaccount/view.dart
Normal file
@ -0,0 +1,322 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../components/my_app_bar.dart';
|
||||||
|
import '../../util/util.dart';
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class OffaccountPage extends StatefulWidget {
|
||||||
|
OffaccountPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_OffaccountState createState() => _OffaccountState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _OffaccountState extends State<OffaccountPage> {
|
||||||
|
int countdown = 10; // 初始倒计时时间
|
||||||
|
bool isButtonDisabled = false; // 按钮是否禁用
|
||||||
|
late Timer timer;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
startCountdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
timer.cancel();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startCountdown() {
|
||||||
|
timer = Timer.periodic(Duration(seconds: 1), (Timer t) {
|
||||||
|
setState(() {
|
||||||
|
if (countdown > 0) {
|
||||||
|
countdown--;
|
||||||
|
} else {
|
||||||
|
timer.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void handleLogout(OffaccountLogic logic) {
|
||||||
|
if(countdown > 0 ){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
showToast(logic.state.photoController.text.toString()+"");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行注销操作
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder<OffaccountLogic>(builder: (logic) {
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: MyAppBar(centerTitle: '注销账号'),
|
||||||
|
body: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// 注销提示信息
|
||||||
|
Text(
|
||||||
|
"注销后,你的账号将",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
"1、无法登录跨友app;",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFB7BECC),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"2、所有信息将被永远删除:身份信息、账户信息、会员、喊话、相册等内容;",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFB7BECC),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"3、您的好友无法与你取得联系(包括关注、粉丝等);",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFB7BECC),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"4、注销后,一个月内该手机号将无法注册新的账号。",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFB7BECC),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 10),
|
||||||
|
|
||||||
|
// 输入手机号或邮箱
|
||||||
|
Text(
|
||||||
|
"请输入绑定的手机号",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFF898F99),
|
||||||
|
fontSize: 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 10),
|
||||||
|
TextFormField(
|
||||||
|
controller: logic.state.photoController,
|
||||||
|
keyboardType: TextInputType.phone,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
FilteringTextInputFormatter.deny(RegExp('[^0-9]')),
|
||||||
|
],
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: "请输入手机号",
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
filled: true,
|
||||||
|
fillColor: Color(0xFF000000),
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
borderSide: BorderSide.none,
|
||||||
|
),
|
||||||
|
contentPadding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
// enabled: countdown == 0, // 当倒计时结束后才可编辑
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
|
||||||
|
// 选择注销原因
|
||||||
|
Text(
|
||||||
|
"请选择你的注销原因",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFF898F99),
|
||||||
|
fontSize: 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 10),
|
||||||
|
GestureDetector(onTap: () {
|
||||||
|
showBottomSheetDialog(context,logic);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 40,
|
||||||
|
margin: EdgeInsets.only(top: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
color: Color(0xFF000000),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: TextFormField(
|
||||||
|
enabled: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: logic.state.offReasonMsg,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Color(0xFFF7FAFA),
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
border: InputBorder.none,
|
||||||
|
contentPadding: EdgeInsets.only(left: 16),
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFF7FAFA),
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
getHomeImage("icon_in"),
|
||||||
|
width: 14,
|
||||||
|
height: 14,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),)
|
||||||
|
,
|
||||||
|
SizedBox(height: 42),
|
||||||
|
|
||||||
|
// 注销按钮
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
|
||||||
|
}, child: Align(
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
child: Container(
|
||||||
|
width: 160,
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: (){
|
||||||
|
handleLogout(logic);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
countdown > 0 ? "注销($countdown s)" : "注销",
|
||||||
|
),
|
||||||
|
style: ButtonStyle(
|
||||||
|
backgroundColor: MaterialStateProperty.all<Color>(
|
||||||
|
countdown > 0 ? Colors.grey : Color(0xFF21BEAB),
|
||||||
|
),
|
||||||
|
shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||||
|
RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),)
|
||||||
|
,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void showBottomSheetDialog(BuildContext context,OffaccountLogic logic) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black.withOpacity(0.6),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(20),
|
||||||
|
topRight: Radius.circular(20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
buildOptionItem("体验太差", context,logic),
|
||||||
|
buildDivider(),
|
||||||
|
buildOptionItem("换平台了", context,logic),
|
||||||
|
buildDivider(),
|
||||||
|
buildOptionItem("担心隐私泄露", context,logic),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildOptionItem(String title, BuildContext context,OffaccountLogic logic) {
|
||||||
|
return GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
// 处理选项点击事件
|
||||||
|
Navigator.pop(context);
|
||||||
|
logic.state.offReasonMsg = title;
|
||||||
|
logic.update();
|
||||||
|
// 执行相应操作
|
||||||
|
// switch (title) {
|
||||||
|
// case "体验太差":
|
||||||
|
//
|
||||||
|
// // 执行体验操作
|
||||||
|
// break;
|
||||||
|
// case "换平台了":
|
||||||
|
// // 执行换平台操作
|
||||||
|
// break;
|
||||||
|
// case "担心隐私泄露":
|
||||||
|
// // 执行泄露隐私操作
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: Get.width,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 16),
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildDivider() {
|
||||||
|
return Container(
|
||||||
|
height: 0.5,
|
||||||
|
color: Color(0xff2E2E3B),
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,7 +1,11 @@
|
|||||||
|
import 'package:circle_app/util/util.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class PhotoinfoLogic extends GetxController {
|
class PhotoinfoLogic extends GetxController {
|
||||||
final PhotoinfoState state = PhotoinfoState();
|
final PhotoinfoState state = PhotoinfoState();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@ -6,14 +9,51 @@ import '../../components/my_app_bar.dart';
|
|||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
class PhotoinfoPage extends StatelessWidget {
|
class PhotoinfoPage extends StatefulWidget {
|
||||||
PhotoinfoPage({Key? key}) : super(key: key);
|
PhotoinfoPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
final logic = Get.find<PhotoinfoLogic>();
|
@override
|
||||||
final state = Get.find<PhotoinfoLogic>().state;
|
_PhotoinfoPage createState() => _PhotoinfoPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PhotoinfoPage extends State<PhotoinfoPage> {
|
||||||
|
|
||||||
|
int _countdownSeconds = 60;
|
||||||
|
bool _isCountingDown = false;
|
||||||
|
Timer? _timer;
|
||||||
|
TextEditingController _photoController = TextEditingController();
|
||||||
|
TextEditingController _passwordController = TextEditingController();
|
||||||
|
TextEditingController _newPhotoController = TextEditingController();
|
||||||
|
TextEditingController _codeController = TextEditingController();
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_timer?.cancel();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startCountdown() {
|
||||||
|
setState(() {
|
||||||
|
_isCountingDown = true;
|
||||||
|
_countdownSeconds = 60;
|
||||||
|
});
|
||||||
|
|
||||||
|
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
|
||||||
|
setState(() {
|
||||||
|
if (_countdownSeconds > 0) {
|
||||||
|
_countdownSeconds--;
|
||||||
|
} else {
|
||||||
|
_isCountingDown = false;
|
||||||
|
_timer?.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder<PhotoinfoLogic>(builder: (logic) {
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@ -48,7 +88,8 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
padding: EdgeInsets.only(left: 16.0.sp, right: 10.sp),
|
padding: EdgeInsets.only(
|
||||||
|
left: 16.0.sp, right: 10.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
"+86",
|
"+86",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -61,7 +102,13 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
height: 32.sp,
|
height: 32.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
controller: _photoController,
|
||||||
textAlignVertical: TextAlignVertical.center,
|
textAlignVertical: TextAlignVertical.center,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
FilteringTextInputFormatter.deny(RegExp('[^0-9]')),
|
||||||
|
],
|
||||||
|
keyboardType: TextInputType.phone,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "请输入已绑定手机号",
|
hintText: "请输入已绑定手机号",
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
@ -104,7 +151,10 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
height: 32.sp,
|
height: 32.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
controller: _passwordController,
|
||||||
textAlignVertical: TextAlignVertical.center,
|
textAlignVertical: TextAlignVertical.center,
|
||||||
|
obscureText: true, // 设置为true以隐藏用户输入的内容
|
||||||
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "请输入密码",
|
hintText: "请输入密码",
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
@ -135,7 +185,8 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 16.0.sp,right: 10.sp),
|
padding: EdgeInsets.only(
|
||||||
|
left: 16.0.sp, right: 10.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"+86",
|
"+86",
|
||||||
@ -150,7 +201,13 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
height: 32.sp,
|
height: 32.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
controller: _newPhotoController,
|
||||||
textAlignVertical: TextAlignVertical.center,
|
textAlignVertical: TextAlignVertical.center,
|
||||||
|
keyboardType: TextInputType.phone,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
FilteringTextInputFormatter.deny(RegExp('[^0-9]')),
|
||||||
|
],
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "请输入新手机号",
|
hintText: "请输入新手机号",
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
@ -186,7 +243,8 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
padding: EdgeInsets.only(left: 10.0.sp, right: 10.sp),
|
padding: EdgeInsets.only(
|
||||||
|
left: 10.0.sp, right: 10.sp),
|
||||||
child: Image(
|
child: Image(
|
||||||
image: AssetImage(getMineImage("im_shield")),
|
image: AssetImage(getMineImage("im_shield")),
|
||||||
width: 24.sp,
|
width: 24.sp,
|
||||||
@ -198,6 +256,7 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
height: 32.sp,
|
height: 32.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
controller: _codeController,
|
||||||
textAlignVertical: TextAlignVertical.center,
|
textAlignVertical: TextAlignVertical.center,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "请输入验证码",
|
hintText: "请输入验证码",
|
||||||
@ -221,6 +280,13 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (!_isCountingDown) {
|
||||||
|
// Only start countdown if not already counting down
|
||||||
|
startCountdown();
|
||||||
|
}
|
||||||
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.fromLTRB(
|
margin: EdgeInsets.fromLTRB(
|
||||||
8.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
|
8.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
|
||||||
@ -231,15 +297,20 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
height: 40.0.sp,
|
height: 40.0.sp,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"获取验证码",
|
_isCountingDown
|
||||||
|
? '$_countdownSeconds 秒'
|
||||||
|
: '获取验证码',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.grey.shade400,
|
color: _isCountingDown
|
||||||
|
? Colors.grey.shade400
|
||||||
|
: Colors.white,
|
||||||
fontSize: 14.0.sp,
|
fontSize: 14.0.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
@ -255,6 +326,27 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
String photo = _photoController.text;
|
||||||
|
String password = _passwordController.text;
|
||||||
|
String newphoto = _newPhotoController.text;
|
||||||
|
String code = _codeController.text;
|
||||||
|
if(photo==""||photo.length<11){
|
||||||
|
showToast("已绑定的手机号输入有误");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
if(password==""){
|
||||||
|
showToast("请输入密码");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
if(newphoto==""||newphoto.length<11){
|
||||||
|
showToast("新手机号输入有误");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
if(code==""){
|
||||||
|
showToast("请输入验证码");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
// Perform action on button press
|
// Perform action on button press
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -282,5 +374,8 @@ class PhotoinfoPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
circle_app/lib/app/report/binding.dart
Normal file
10
circle_app/lib/app/report/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class ReportBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => ReportLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
44
circle_app/lib/app/report/logic.dart
Normal file
44
circle_app/lib/app/report/logic.dart
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
|
||||||
|
import 'state.dart';
|
||||||
|
|
||||||
|
class ReportLogic extends GetxController {
|
||||||
|
final ReportState state = ReportState();
|
||||||
|
List<MyObject> arrList = <MyObject>[
|
||||||
|
MyObject("涉嫌欺诈", false),
|
||||||
|
MyObject("色情低俗", false),
|
||||||
|
MyObject("侮辱谩骂", false),
|
||||||
|
MyObject("骚扰广告", false),
|
||||||
|
MyObject("扰乱平台", false),
|
||||||
|
MyObject("散布谣言", false),
|
||||||
|
MyObject("盗图侵权", false),
|
||||||
|
MyObject("其他违规", false)
|
||||||
|
];
|
||||||
|
|
||||||
|
List<MyObject> getItemList() {
|
||||||
|
return arrList;
|
||||||
|
}
|
||||||
|
final ImagePicker _picker = ImagePicker();
|
||||||
|
Future getImageFile() async {
|
||||||
|
try {
|
||||||
|
final XFile? pickedFile = await _picker.pickImage(
|
||||||
|
source: ImageSource.gallery,
|
||||||
|
);
|
||||||
|
// setState(() {
|
||||||
|
// _setImageFileListFromFile(pickedFile);
|
||||||
|
// });
|
||||||
|
} catch (e) {
|
||||||
|
// setState(() {
|
||||||
|
// _pickImageError = e;
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyObject {
|
||||||
|
String name;
|
||||||
|
bool isSelect;
|
||||||
|
|
||||||
|
MyObject(this.name, this.isSelect);
|
||||||
|
}
|
||||||
13
circle_app/lib/app/report/state.dart
Normal file
13
circle_app/lib/app/report/state.dart
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class ReportState {
|
||||||
|
|
||||||
|
ReportState() {
|
||||||
|
|
||||||
|
///Initialize variables
|
||||||
|
///
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
234
circle_app/lib/app/report/view.dart
Normal file
234
circle_app/lib/app/report/view.dart
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../components/my_app_bar.dart';
|
||||||
|
import '../../util/util.dart';
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class ReportPage extends StatelessWidget {
|
||||||
|
ReportPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
final logic = Get.find<ReportLogic>();
|
||||||
|
final state = Get.find<ReportLogic>().state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder(builder: (ReportLogic controller) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: MyAppBar(
|
||||||
|
centerTitle: '举报',
|
||||||
|
actionWdiget: Text(
|
||||||
|
"提交",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
showToast("提交");
|
||||||
|
},
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 16, top: 16),
|
||||||
|
child: Text(
|
||||||
|
'举报类目',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 120.sp,
|
||||||
|
child: _reportAdapter(controller),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.fromLTRB(16, 20, 16, 0),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'详细截图(请至少上传一张图片,帮助审核处理)',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white70,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 20),
|
||||||
|
// 添加 RecyclerView(ListView) 的内容
|
||||||
|
// 例如: MyRecyclerViewWidget(),
|
||||||
|
Container(
|
||||||
|
height: 130.sp,
|
||||||
|
child: _imageAdapter(controller)),
|
||||||
|
Text(
|
||||||
|
'补充说明',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 30),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 16, right: 16),
|
||||||
|
height: 200,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFF4C3E5F),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(16.sp),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
TextField(
|
||||||
|
decoration: InputDecoration.collapsed(
|
||||||
|
hintText: '违规补充说明,帮助审核处理,选填',
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Color(0xFFB7BECC),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
maxLines: null,
|
||||||
|
maxLength: 200,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFF000000),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _reportAdapter(ReportLogic controller) {
|
||||||
|
return GridView.builder(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 3,
|
||||||
|
// crossAxisSpacing: 6.sp,
|
||||||
|
childAspectRatio: 3,
|
||||||
|
),
|
||||||
|
itemCount: controller.getItemList().length,
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.arrList[index].isSelect =
|
||||||
|
!controller.arrList[index].isSelect;
|
||||||
|
controller.update();
|
||||||
|
},
|
||||||
|
child: _getItemSelect(controller.arrList[index]),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _imageAdapter(ReportLogic controller) {
|
||||||
|
return GridView.builder(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 3, // 每行显示的项目数量
|
||||||
|
),
|
||||||
|
itemCount: 20, // 项目的总数量,包括固定图片和接口获取的项目
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
if (index == 0) {
|
||||||
|
// 第一个项目,显示固定的图片
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.getImageFile();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getMineImage("icon_img_add")),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// 后续项目,根据接口获取数据
|
||||||
|
// 假设通过接口获取到的数据存储在一个名为 data 的列表中
|
||||||
|
// var itemData = data[index - 1]; // 减去第一个固定图片的索引
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Center(
|
||||||
|
// child: _buildImageItem(
|
||||||
|
// 'https://book.flutterchina.club/assets/img/logo.png'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _getItemSelect(MyObject bean) {
|
||||||
|
if (bean.isSelect) {
|
||||||
|
return Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 8.sp, right: 8.sp, top: 6.sp, bottom: 6.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(20.sp),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
bean.name,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 11.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 8.sp, right: 8.sp, top: 6.sp, bottom: 6.sp),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(20.0), // 设置圆角半径
|
||||||
|
border: Border.all(
|
||||||
|
color: Color(0xFF392D53),
|
||||||
|
),
|
||||||
|
color: Color(0xFF392D53),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
bean.name,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 11.0,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
10
circle_app/lib/app/swiper/binding.dart
Normal file
10
circle_app/lib/app/swiper/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class SwiperBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => SwiperLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
8
circle_app/lib/app/swiper/logic.dart
Normal file
8
circle_app/lib/app/swiper/logic.dart
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'state.dart';
|
||||||
|
|
||||||
|
class SwiperLogic extends GetxController {
|
||||||
|
final SwiperState state = SwiperState();
|
||||||
|
List<Map> imgList = Get.arguments ;
|
||||||
|
}
|
||||||
5
circle_app/lib/app/swiper/state.dart
Normal file
5
circle_app/lib/app/swiper/state.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class SwiperState {
|
||||||
|
SwiperState() {
|
||||||
|
///Initialize variables
|
||||||
|
}
|
||||||
|
}
|
||||||
44
circle_app/lib/app/swiper/view.dart
Normal file
44
circle_app/lib/app/swiper/view.dart
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_swiper/flutter_swiper.dart';
|
||||||
|
import 'package:get/get_state_manager/src/simple/get_state.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class SwiperPage extends StatefulWidget {
|
||||||
|
const SwiperPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SwiperPage> createState() => _SwiperPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SwiperPageState extends State<SwiperPage> {
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder<SwiperLogic>(builder: (logic) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: null,
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
body: GestureDetector(
|
||||||
|
behavior: HitTestBehavior.translucent,
|
||||||
|
onTap: (() {
|
||||||
|
//点击任意地方都能关闭页面,并且不影响你的滑动查看
|
||||||
|
Navigator.pop(context);
|
||||||
|
}),
|
||||||
|
child: Swiper(
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Image.network(
|
||||||
|
logic.imgList[index]['url'], fit: BoxFit.contain,)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
itemCount: logic.imgList.length,
|
||||||
|
pagination: SwiperPagination(), //下面的分页小点
|
||||||
|
// control: new SwiperControl(), //左右的那个箭头,在某模拟器中会出现蓝线
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
10
circle_app/lib/app/text/binding.dart
Normal file
10
circle_app/lib/app/text/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class TextBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => TextLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
7
circle_app/lib/app/text/logic.dart
Normal file
7
circle_app/lib/app/text/logic.dart
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'state.dart';
|
||||||
|
|
||||||
|
class TextLogic extends GetxController {
|
||||||
|
final TextState state = TextState();
|
||||||
|
}
|
||||||
5
circle_app/lib/app/text/state.dart
Normal file
5
circle_app/lib/app/text/state.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class TextState {
|
||||||
|
TextState() {
|
||||||
|
///Initialize variables
|
||||||
|
}
|
||||||
|
}
|
||||||
998
circle_app/lib/app/text/view.dart
Normal file
998
circle_app/lib/app/text/view.dart
Normal file
@ -0,0 +1,998 @@
|
|||||||
|
import 'package:circle_app/app/text/logic.dart';
|
||||||
|
import 'package:circle_app/util/util.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get_core/src/get_main.dart';
|
||||||
|
import 'package:get/get_state_manager/src/simple/get_state.dart';
|
||||||
|
|
||||||
|
import '../../components/my_app_bar.dart';
|
||||||
|
|
||||||
|
class TextPage extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
State<TextPage> createState() => _MyTabbedScreenState();
|
||||||
|
}
|
||||||
|
class _MyTabbedScreenState extends State<TextPage>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
late TabController _tabController;
|
||||||
|
|
||||||
|
ScrollController scrollController = ScrollController();
|
||||||
|
bool isShowBlackTitle = false;
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_tabController = TabController(length: 2, vsync: this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_tabController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
void _onScroll(offset) {
|
||||||
|
if (offset > 100) {
|
||||||
|
setState(() {
|
||||||
|
isShowBlackTitle = true;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
isShowBlackTitle = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder(builder: (TextLogic controller) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: MyAppBar(
|
||||||
|
centerTitle: '个人主页',
|
||||||
|
),
|
||||||
|
body:Container(
|
||||||
|
margin: EdgeInsets.all(10.sp),
|
||||||
|
child: Stack(children: [
|
||||||
|
|
||||||
|
NotificationListener(
|
||||||
|
onNotification: (scrollNotification) {
|
||||||
|
if (scrollNotification is ScrollUpdateNotification &&
|
||||||
|
scrollNotification.depth == 0) {
|
||||||
|
//滚动并且是列表滚动的时候
|
||||||
|
_onScroll(scrollNotification.metrics.pixels);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
child: Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
NestedScrollView(
|
||||||
|
headerSliverBuilder:
|
||||||
|
(BuildContext context, bool innerBoxIsScrolled) {
|
||||||
|
return <Widget>[
|
||||||
|
SliverOverlapAbsorber(
|
||||||
|
handle: NestedScrollView
|
||||||
|
.sliverOverlapAbsorberHandleFor(context),
|
||||||
|
sliver: SliverAppBar(
|
||||||
|
leading: new Container(
|
||||||
|
child: Container(),
|
||||||
|
),
|
||||||
|
title: isShowBlackTitle ? Text('') : Text(''),
|
||||||
|
centerTitle: false,
|
||||||
|
pinned: false,
|
||||||
|
floating: false,
|
||||||
|
snap: false,
|
||||||
|
primary: false,
|
||||||
|
expandedHeight: 165.0.sp,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
elevation: 0,
|
||||||
|
//是否显示阴影,直接取值innerBoxIsScrolled,展开不显示阴影,合并后会显示
|
||||||
|
forceElevated: innerBoxIsScrolled,
|
||||||
|
actions: <Widget>[
|
||||||
|
new Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
right: 10, top: 20, bottom: 10),
|
||||||
|
child: Container(),
|
||||||
|
),
|
||||||
|
new Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
right: 10, top: 20, bottom: 10),
|
||||||
|
child: Container(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
|
||||||
|
flexibleSpace: FlexibleSpaceBar(
|
||||||
|
collapseMode: CollapseMode.pin,
|
||||||
|
background: new Column(
|
||||||
|
children: <Widget>[
|
||||||
|
new Container(
|
||||||
|
height: 165.sp,
|
||||||
|
child: new Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
_imagelistView(controller),
|
||||||
|
Flexible(
|
||||||
|
child: buildUserContainer(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment
|
||||||
|
.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"name",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color.fromRGBO(
|
||||||
|
247, 250, 250, 1.0),
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10.sp),
|
||||||
|
_buildInfoRow(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
right: 5.sp),
|
||||||
|
width: 10.sp,
|
||||||
|
height: 10.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color:
|
||||||
|
Color(0xFF00FFF4),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"在线·深圳",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(
|
||||||
|
0xFF00FFF4)),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
// margin: EdgeInsets.only(top: 18.sp, bottom: 18.sp),
|
||||||
|
height: 59.sp,
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount: 8,
|
||||||
|
// 替换为实际的 item 数量
|
||||||
|
scrollDirection:
|
||||||
|
Axis.horizontal,
|
||||||
|
// 设置为水平方向
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 18.sp),
|
||||||
|
// 替换为实际的边距值
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
right: 11.sp),
|
||||||
|
// 替换为实际的 item 间距
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius
|
||||||
|
.circular(17.0),
|
||||||
|
// 设置圆角半径
|
||||||
|
gradient:
|
||||||
|
LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
color:
|
||||||
|
Color(0xFF392D53),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(
|
||||||
|
0.2.sp),
|
||||||
|
decoration:
|
||||||
|
BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius
|
||||||
|
.circular(
|
||||||
|
17.0),
|
||||||
|
// shape: BoxShape.circle,
|
||||||
|
color:
|
||||||
|
Color(0xFF392D53),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(
|
||||||
|
top: 2.sp,
|
||||||
|
bottom: 2.sp,
|
||||||
|
left: 15.sp,
|
||||||
|
right: 15.sp),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
"圆角背景边框",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 11.0,
|
||||||
|
color: Colors
|
||||||
|
.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
), // 替换为实际的列表项小部件
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SliverPersistentHeader(
|
||||||
|
delegate: _SliverAppBarDelegate2(titleTab()),
|
||||||
|
pinned: true,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
},
|
||||||
|
body: Container(
|
||||||
|
margin: EdgeInsets.all(0),
|
||||||
|
child: TabBarView(
|
||||||
|
controller: _tabController,
|
||||||
|
children: [
|
||||||
|
_imageAdapter(controller),
|
||||||
|
_imageAdapter(controller),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
Positioned(
|
||||||
|
bottom: 27.sp,
|
||||||
|
width:100,
|
||||||
|
child: _MeInfoButton(controller),
|
||||||
|
)
|
||||||
|
]),),
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Widget _MeInfoButton(TextLogic controller) {
|
||||||
|
if ("" == "") {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// showToast("完善资料");
|
||||||
|
// Get.toNamed(AppRoutes.TextActivity);
|
||||||
|
// Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
|
||||||
|
},
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp, bottom: 10.sp, left: 55.sp, right: 55.sp),
|
||||||
|
child: Text(
|
||||||
|
"完善个人形象照",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(left: 18.sp, right: 18.sp),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
showToast("鼓掌");
|
||||||
|
_showBottomSheet(context);
|
||||||
|
},
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getMineImage("icon_like")),
|
||||||
|
width: 40.sp,
|
||||||
|
height: 40.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
showToast("喜欢");
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17.sp),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp, bottom: 10.sp, left: 52.sp, right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"喜欢",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
showToast("私聊");
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17.sp),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp, bottom: 10.sp, left: 52.sp, right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"私聊",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildContent(TextLogic controller) {
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 19.sp, vertical: 14.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
_imagelistView(controller),
|
||||||
|
Flexible(
|
||||||
|
child: buildUserContainer(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"name",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color.fromRGBO(247, 250, 250, 1.0),
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10.sp),
|
||||||
|
_buildInfoRow(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 10.sp,
|
||||||
|
height: 10.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: Color(0xFF00FFF4),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"在线·深圳",
|
||||||
|
style: TextStyle(color: Color(0xFF00FFF4)),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
// margin: EdgeInsets.only(top: 18.sp, bottom: 18.sp),
|
||||||
|
height: 59.sp,
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount: 8,
|
||||||
|
// 替换为实际的 item 数量
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
// 设置为水平方向
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 18.sp),
|
||||||
|
// 替换为实际的边距值
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(right: 11.sp), // 替换为实际的 item 间距
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17.0), // 设置圆角半径
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
color: Color(0xFF392D53),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(0.2.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
|
// shape: BoxShape.circle,
|
||||||
|
color: Color(0xFF392D53),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
"圆角背景边框",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 11.0,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
), // 替换为实际的列表项小部件
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
titleTab(),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp),
|
||||||
|
child: Text(
|
||||||
|
"1314位圈友感兴趣,其中10位已催您更新",
|
||||||
|
style: TextStyle(color: Colors.white30),
|
||||||
|
)),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
// color: Colors.blue,
|
||||||
|
child: TabBarView(
|
||||||
|
controller: _tabController,
|
||||||
|
children: [
|
||||||
|
_imageAdapter(controller),
|
||||||
|
Text("喊话"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Widget titleTab1() {
|
||||||
|
// return SliverAppBar(
|
||||||
|
// backgroundColor: Colors.transparent,
|
||||||
|
// pinned: true,
|
||||||
|
// floating: true,
|
||||||
|
// expandedHeight: 100.sp,
|
||||||
|
// flexibleSpace: FlexibleSpaceBar(
|
||||||
|
// background: Container(
|
||||||
|
// padding: EdgeInsets.symmetric(horizontal: 16.sp),
|
||||||
|
// alignment: Alignment.bottomLeft,
|
||||||
|
// child: Text(
|
||||||
|
// '标题',
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: Colors.white,
|
||||||
|
// fontSize: 24.sp,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
Column titleTab(){
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
height: 27.sp,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
TabBar(
|
||||||
|
isScrollable: true,
|
||||||
|
controller: _tabController,
|
||||||
|
indicatorColor: Color(0xFF00FFF4),
|
||||||
|
indicatorWeight: 2.sp,
|
||||||
|
labelColor: Color(0xFF00FFF4),
|
||||||
|
unselectedLabelColor: Color(0xB3FFFFFF),
|
||||||
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
|
tabs: [
|
||||||
|
Tab(
|
||||||
|
text: "形象照",
|
||||||
|
),
|
||||||
|
Tab(text: "喊话")
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 2.sp, bottom: 2.sp, left: 12.sp, right: 12.sp),
|
||||||
|
child: Text(
|
||||||
|
"完成",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _imageAdapter(TextLogic controller) {
|
||||||
|
return GridView.builder(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 3, // 每行显示的项目数量
|
||||||
|
),
|
||||||
|
itemCount: 20, // 项目的总数量,包括固定图片和接口获取的项目
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
if (index == 0) {
|
||||||
|
// 第一个项目,显示固定的图片
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// controller.getImageFile();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getMineImage("icon_img_add")),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// 后续项目,根据接口获取数据
|
||||||
|
// 假设通过接口获取到的数据存储在一个名为 data 的列表中
|
||||||
|
// var itemData = data[index - 1]; // 减去第一个固定图片的索引
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Center(
|
||||||
|
child: _buildImageItem(
|
||||||
|
'https://book.flutterchina.club/assets/img/logo.png',
|
||||||
|
controller)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildInfoRow() {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color.fromRGBO(141, 255, 248, 1.0),
|
||||||
|
Color.fromRGBO(181, 211, 255, 1.0),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
||||||
|
child: Text(
|
||||||
|
"男,33,CD",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 6.sp),
|
||||||
|
Image(
|
||||||
|
image: AssetImage(getBaseImage("vip")),
|
||||||
|
width: 44.sp,
|
||||||
|
height: 18.sp,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildUserContainer() {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 1.sp, vertical: 14.sp),
|
||||||
|
height: 58.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getMineImage("icon_user_content")),
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 24.sp),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'动物是灵性的动物是灵性的动物是灵性的动物是灵性的动物是灵性的动物是灵性的动物是灵性的,不同于植物。 你若孤独, 它陪伴你。在阳光的午后,蜷缩在你的...',
|
||||||
|
maxLines: 2,
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _imagelistView(TextLogic controller) {
|
||||||
|
return Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 68.sp,
|
||||||
|
height: 68.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 66.sp,
|
||||||
|
height: 66.sp,
|
||||||
|
child: _buildAvatar1(controller),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildAvatar1(TextLogic controller) {
|
||||||
|
return ClipOval(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {},
|
||||||
|
child: Image.network(
|
||||||
|
'https://book.flutterchina.club/assets/img/logo.png',
|
||||||
|
width: 66.sp,
|
||||||
|
height: 66.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildImageItem(String url, TextLogic controller) {
|
||||||
|
return Stack(
|
||||||
|
children: [
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
showToast("点击了图片");
|
||||||
|
},
|
||||||
|
child: Image.network(
|
||||||
|
url,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if ("" == "")
|
||||||
|
Positioned(
|
||||||
|
top: 0,
|
||||||
|
right: 0,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
showToast("删除");
|
||||||
|
},
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getMineImage("icon_img_del")),
|
||||||
|
width: 20.sp,
|
||||||
|
height: 20.sp,
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _showBottomSheet(BuildContext context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(16.0),
|
||||||
|
topRight: Radius.circular(16.0),
|
||||||
|
),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF4A3E5D),
|
||||||
|
Color(0xFF344143),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
height: 118.0,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
// Get.toNamed(AppRoutes.ReportActivity);
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image(
|
||||||
|
image: AssetImage(getMineImage("icon_report")),
|
||||||
|
width: 40.sp,
|
||||||
|
height: 40.sp,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 2.sp),
|
||||||
|
child: Text(
|
||||||
|
"举报",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 75.sp),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
_showReportDialog(context);
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image(
|
||||||
|
image: AssetImage(getMineImage("icon_block")),
|
||||||
|
width: 40.sp,
|
||||||
|
height: 40.sp,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 2.sp),
|
||||||
|
child: Text(
|
||||||
|
"拉黑",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _showReportDialog(BuildContext context) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
height: 277.sp,
|
||||||
|
padding: EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(1.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
"是否拉黑",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getMineImage("icon_dialog_black")),
|
||||||
|
width: 70.sp,
|
||||||
|
height: 70.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注。",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"否",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 24.sp),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"是",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class _SliverAppBarDelegate2 extends SliverPersistentHeaderDelegate {
|
||||||
|
_SliverAppBarDelegate2(this._tabBar);
|
||||||
|
|
||||||
|
final Column _tabBar;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(
|
||||||
|
BuildContext context, double shrinkOffset, bool overlapsContent) {
|
||||||
|
return _tabBar;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
double get maxExtent => 52;
|
||||||
|
|
||||||
|
@override
|
||||||
|
double get minExtent => 52;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -4,6 +4,7 @@ import 'package:image_picker/image_picker.dart';
|
|||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class UserinfoLogic extends GetxController {
|
class UserinfoLogic extends GetxController {
|
||||||
|
var userId = Get.arguments ?? "";
|
||||||
final UserinfoState state = UserinfoState();
|
final UserinfoState state = UserinfoState();
|
||||||
final ImagePicker _picker = ImagePicker();
|
final ImagePicker _picker = ImagePicker();
|
||||||
Future getImageFile() async {
|
Future getImageFile() async {
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../components/my_app_bar.dart';
|
import '../../components/my_app_bar.dart';
|
||||||
|
import '../../router/app_routers.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
@ -15,11 +16,12 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
|
|
||||||
get data => null;
|
ScrollController scrollController = ScrollController();
|
||||||
|
bool isShowBlackTitle = false;
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
|
||||||
super.initState();
|
super.initState();
|
||||||
_tabController = TabController(length: 2, vsync: this);
|
_tabController = TabController(length: 2, vsync: this);
|
||||||
}
|
}
|
||||||
@ -29,13 +31,27 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
void _onScroll(offset) {
|
||||||
|
if (offset > 100) {
|
||||||
|
setState(() {
|
||||||
|
isShowBlackTitle = true;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
isShowBlackTitle = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final logic = Get.find<UserinfoLogic>();
|
final logic = Get.find<UserinfoLogic>();
|
||||||
final state = Get.find<UserinfoLogic>().state;
|
final state = Get.find<UserinfoLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var userId = Get.arguments ?? "";
|
|
||||||
return GetBuilder(builder: (UserinfoLogic controller) {
|
return GetBuilder(builder: (UserinfoLogic controller) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -57,7 +73,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
Positioned(
|
Positioned(
|
||||||
bottom: 27.sp,
|
bottom: 27.sp,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
child: _MeInfoButton(userId),
|
child: _MeInfoButton(controller),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -65,11 +81,12 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _MeInfoButton(String userId) {
|
Widget _MeInfoButton(UserinfoLogic controller) {
|
||||||
if (userId == "1") {
|
if (controller.userId == "") {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showToast("完善资料");
|
// showToast("完善资料");
|
||||||
|
Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -118,7 +135,6 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
showToast("喜欢");
|
showToast("喜欢");
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
// height: 40,
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17.sp),
|
borderRadius: BorderRadius.circular(17.sp),
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
@ -181,7 +197,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
_headView(),
|
_imagelistView(controller),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: buildUserContainer(),
|
child: buildUserContainer(),
|
||||||
),
|
),
|
||||||
@ -237,15 +253,25 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
margin: EdgeInsets.only(right: 11.sp), // 替换为实际的 item 间距
|
margin: EdgeInsets.only(right: 11.sp), // 替换为实际的 item 间距
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10.0), // 设置圆角半径
|
borderRadius: BorderRadius.circular(17.0), // 设置圆角半径
|
||||||
border: Border.all(
|
gradient: LinearGradient(
|
||||||
color: Color(0xFF392D53), // 边框颜色
|
colors: [
|
||||||
width: 1.0, // 边框宽度
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
color: Color(0xFF392D53),
|
color: Color(0xFF392D53),
|
||||||
),
|
),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(0.2.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
|
// shape: BoxShape.circle,
|
||||||
|
color: Color(0xFF392D53),
|
||||||
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(top: 2.sp,bottom: 2.sp,left: 15.sp,right: 15.sp),
|
padding: EdgeInsets.only(
|
||||||
|
top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"圆角背景边框",
|
"圆角背景边框",
|
||||||
@ -253,13 +279,39 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
fontSize: 11.0,
|
fontSize: 11.0,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
),),),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
), // 替换为实际的列表项小部件
|
), // 替换为实际的列表项小部件
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
titleTab(),
|
||||||
Container(
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp),
|
||||||
|
child: Text(
|
||||||
|
"1314位圈友感兴趣,其中10位已催您更新",
|
||||||
|
style: TextStyle(color: Colors.white30),
|
||||||
|
)),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
// color: Colors.blue,
|
||||||
|
child: TabBarView(
|
||||||
|
controller: _tabController,
|
||||||
|
children: [
|
||||||
|
_imageAdapter(controller),
|
||||||
|
Text("喊话"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Widget titleTab(){
|
||||||
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
height: 27.sp,
|
height: 27.sp,
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -303,27 +355,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)),
|
));
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp),
|
|
||||||
child: Text(
|
|
||||||
"1314位圈友感兴趣,其中10位已催您更新",
|
|
||||||
style: TextStyle(color: Colors.white30),
|
|
||||||
)),
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
// color: Colors.blue,
|
|
||||||
child: TabBarView(
|
|
||||||
controller: _tabController,
|
|
||||||
children: [
|
|
||||||
_imageAdapter(controller),
|
|
||||||
Text("喊话"),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _imageAdapter(UserinfoLogic controller) {
|
Widget _imageAdapter(UserinfoLogic controller) {
|
||||||
@ -354,8 +386,8 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
margin: EdgeInsets.all(5.sp),
|
margin: EdgeInsets.all(5.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: _buildImageItem(
|
child: _buildImageItem(
|
||||||
'https://book.flutterchina.club/assets/img/logo.png'),
|
'https://book.flutterchina.club/assets/img/logo.png',
|
||||||
),
|
controller)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -377,7 +409,8 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.only(top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
padding: EdgeInsets.only(
|
||||||
|
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
"男,33,CD",
|
"男,33,CD",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -420,7 +453,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _headView() {
|
Widget _imagelistView(UserinfoLogic controller) {
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -439,13 +472,13 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: 66.sp,
|
width: 66.sp,
|
||||||
height: 66.sp,
|
height: 66.sp,
|
||||||
child: _buildAvatar1(),
|
child: _buildAvatar1(controller),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildAvatar1() {
|
Widget _buildAvatar1(UserinfoLogic controller) {
|
||||||
return ClipOval(
|
return ClipOval(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
@ -458,7 +491,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildImageItem(String url) {
|
Widget _buildImageItem(String url, UserinfoLogic controller) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
@ -472,6 +505,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (controller.userId == "")
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 0,
|
top: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
@ -489,9 +523,6 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void _showBottomSheet(BuildContext context) {
|
void _showBottomSheet(BuildContext context) {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
@ -512,21 +543,208 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
height: 118.0,
|
height: 118.0,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
Get.toNamed(AppRoutes.ReportActivity);
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image(
|
||||||
|
image: AssetImage(getMineImage("icon_report")),
|
||||||
|
width: 40.sp,
|
||||||
|
height: 40.sp,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 2.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
'顶部圆角容器',
|
"举报",
|
||||||
textAlign: TextAlign.center,
|
style: TextStyle(color: Colors.white),
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 20.0,
|
)
|
||||||
color: Colors.white,
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
SizedBox(width: 75.sp),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
_showReportDialog(context);
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image(
|
||||||
|
image: AssetImage(getMineImage("icon_block")),
|
||||||
|
width: 40.sp,
|
||||||
|
height: 40.sp,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 2.sp),
|
||||||
|
child: Text(
|
||||||
|
"拉黑",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
));
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showReportDialog(BuildContext context) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
height: 277.sp,
|
||||||
|
padding: EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(1.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
"是否拉黑",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getMineImage("icon_dialog_black")),
|
||||||
|
width: 70.sp,
|
||||||
|
height: 70.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注。",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"否",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 24.sp),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"是",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,9 +2,13 @@ import 'package:circle_app/app/aboutapp/binding.dart';
|
|||||||
import 'package:circle_app/app/aboutapp/view.dart';
|
import 'package:circle_app/app/aboutapp/view.dart';
|
||||||
import 'package:circle_app/app/account/binding.dart';
|
import 'package:circle_app/app/account/binding.dart';
|
||||||
import 'package:circle_app/app/account/view.dart';
|
import 'package:circle_app/app/account/view.dart';
|
||||||
|
import 'package:circle_app/app/bindmail/binding.dart';
|
||||||
|
import 'package:circle_app/app/bindmail/view.dart';
|
||||||
import 'package:circle_app/app/blacklist/binding.dart';
|
import 'package:circle_app/app/blacklist/binding.dart';
|
||||||
import 'package:circle_app/app/call_out/binding.dart';
|
import 'package:circle_app/app/call_out/binding.dart';
|
||||||
import 'package:circle_app/app/call_out/view.dart';
|
import 'package:circle_app/app/call_out/view.dart';
|
||||||
|
import 'package:circle_app/app/feedback/binding.dart';
|
||||||
|
import 'package:circle_app/app/feedback/view.dart';
|
||||||
import 'package:circle_app/app/friendslist/binding.dart';
|
import 'package:circle_app/app/friendslist/binding.dart';
|
||||||
import 'package:circle_app/app/friendslist/view.dart';
|
import 'package:circle_app/app/friendslist/view.dart';
|
||||||
import 'package:circle_app/app/help/binding.dart';
|
import 'package:circle_app/app/help/binding.dart';
|
||||||
@ -14,12 +18,20 @@ import 'package:circle_app/app/home/view.dart';
|
|||||||
import 'package:circle_app/app/login/login/view.dart';
|
import 'package:circle_app/app/login/login/view.dart';
|
||||||
import 'package:circle_app/app/minefragment/binding.dart';
|
import 'package:circle_app/app/minefragment/binding.dart';
|
||||||
import 'package:circle_app/app/minefragment/view.dart';
|
import 'package:circle_app/app/minefragment/view.dart';
|
||||||
|
import 'package:circle_app/app/offaccount/binding.dart';
|
||||||
|
import 'package:circle_app/app/offaccount/view.dart';
|
||||||
import 'package:circle_app/app/photoinfo/binding.dart';
|
import 'package:circle_app/app/photoinfo/binding.dart';
|
||||||
import 'package:circle_app/app/photoinfo/view.dart';
|
import 'package:circle_app/app/photoinfo/view.dart';
|
||||||
|
import 'package:circle_app/app/report/binding.dart';
|
||||||
|
import 'package:circle_app/app/report/view.dart';
|
||||||
import 'package:circle_app/app/setup/binding.dart';
|
import 'package:circle_app/app/setup/binding.dart';
|
||||||
import 'package:circle_app/app/setup/view.dart';
|
import 'package:circle_app/app/setup/view.dart';
|
||||||
import 'package:circle_app/app/login/complete_material/binding.dart';
|
import 'package:circle_app/app/login/complete_material/binding.dart';
|
||||||
import 'package:circle_app/app/login/complete_material/view.dart';
|
import 'package:circle_app/app/login/complete_material/view.dart';
|
||||||
|
import 'package:circle_app/app/swiper/binding.dart';
|
||||||
|
import 'package:circle_app/app/swiper/view.dart';
|
||||||
|
import 'package:circle_app/app/text/binding.dart';
|
||||||
|
import 'package:circle_app/app/text/view.dart';
|
||||||
import 'package:circle_app/app/userinfo/binding.dart';
|
import 'package:circle_app/app/userinfo/binding.dart';
|
||||||
import 'package:circle_app/app/userinfo/view.dart';
|
import 'package:circle_app/app/userinfo/view.dart';
|
||||||
import 'package:get/get_navigation/src/routes/get_route.dart';
|
import 'package:get/get_navigation/src/routes/get_route.dart';
|
||||||
@ -91,6 +103,36 @@ class AppPages {
|
|||||||
page: () => Call_outPage(),
|
page: () => Call_outPage(),
|
||||||
binding: Call_outBinding(),
|
binding: Call_outBinding(),
|
||||||
),
|
),
|
||||||
GetPage(name: AppRoutes.Login, page: () => LoginPage())
|
GetPage(name: AppRoutes.Login, page: () => LoginPage()),
|
||||||
|
GetPage(
|
||||||
|
name: AppRoutes.ReportActivity,
|
||||||
|
page: () => ReportPage(),
|
||||||
|
binding: ReportBinding(),
|
||||||
|
),
|
||||||
|
GetPage(
|
||||||
|
name: AppRoutes.FeedbackActivity,
|
||||||
|
page: () => FeedbackPage(),
|
||||||
|
binding: FeedbackBinding(),
|
||||||
|
),
|
||||||
|
GetPage(
|
||||||
|
name: AppRoutes.BindMailActivity,
|
||||||
|
page: () => BindmailPage(),
|
||||||
|
binding: BindmailBinding(),
|
||||||
|
),
|
||||||
|
GetPage(
|
||||||
|
name: AppRoutes.TextActivity,
|
||||||
|
page: () => TextPage(),
|
||||||
|
binding: TextBinding(),
|
||||||
|
),
|
||||||
|
GetPage(
|
||||||
|
name: AppRoutes.Swiper,
|
||||||
|
page: () => SwiperPage(),
|
||||||
|
binding: SwiperBinding(),
|
||||||
|
),
|
||||||
|
GetPage(
|
||||||
|
name: AppRoutes.OffAccountActivity,
|
||||||
|
page: () => OffaccountPage(),
|
||||||
|
binding: OffaccountBinding(),
|
||||||
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,4 +12,10 @@ abstract class AppRoutes {
|
|||||||
static const HelpActivity = '/user/HelpActivity';
|
static const HelpActivity = '/user/HelpActivity';
|
||||||
static const FriendsActivity = '/user/FriendsActivity';
|
static const FriendsActivity = '/user/FriendsActivity';
|
||||||
static const UserInfoActivity = '/user/UserInfoActivity';
|
static const UserInfoActivity = '/user/UserInfoActivity';
|
||||||
|
static const ReportActivity = '/user/ReportActivity';
|
||||||
|
static const FeedbackActivity = '/user/FeedbackActivity';
|
||||||
|
static const BindMailActivity = '/user/BindMailActivity';
|
||||||
|
static const TextActivity = '/user/TextActivity';
|
||||||
|
static const Swiper = '/user/Swiper';
|
||||||
|
static const OffAccountActivity = '/user/OffAccountActivity';
|
||||||
}
|
}
|
||||||
@ -52,6 +52,8 @@ dependencies:
|
|||||||
flutter_swiper: ^1.1.6
|
flutter_swiper: ^1.1.6
|
||||||
# 选择器弹窗
|
# 选择器弹窗
|
||||||
flutter_pickers: ^2.1.9
|
flutter_pickers: ^2.1.9
|
||||||
|
#七牛
|
||||||
|
qiniu_flutter_sdk: ^0.5.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user