|
|
@ -1,5 +1,6 @@ |
|
|
import 'package:cached_network_image/cached_network_image.dart'; |
|
|
import 'package:cached_network_image/cached_network_image.dart'; |
|
|
import 'package:dating_touchme_app/controller/global.dart'; |
|
|
import 'package:dating_touchme_app/controller/global.dart'; |
|
|
|
|
|
import 'package:dating_touchme_app/controller/home/user_information_controller.dart'; |
|
|
import 'package:dating_touchme_app/generated/assets.dart'; |
|
|
import 'package:dating_touchme_app/generated/assets.dart'; |
|
|
import 'package:dating_touchme_app/model/home/marriage_data.dart'; |
|
|
import 'package:dating_touchme_app/model/home/marriage_data.dart'; |
|
|
import 'package:dating_touchme_app/pages/home/report_page.dart'; |
|
|
import 'package:dating_touchme_app/pages/home/report_page.dart'; |
|
|
@ -9,457 +10,417 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
import 'package:get/get_core/src/get_main.dart'; |
|
|
import 'package:get/get_core/src/get_main.dart'; |
|
|
|
|
|
|
|
|
class UserInformationPage extends StatefulWidget { |
|
|
|
|
|
final MarriageData userData; |
|
|
|
|
|
|
|
|
class UserInformationPage extends StatelessWidget { |
|
|
|
|
|
final String miId; |
|
|
|
|
|
final String userId; |
|
|
|
|
|
const UserInformationPage({super.key, required this.miId, required this.userId}); |
|
|
|
|
|
|
|
|
const UserInformationPage({super.key, required this.userData}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
|
State<UserInformationPage> createState() => _UserInformationPageState(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class _UserInformationPageState extends State<UserInformationPage> { |
|
|
|
|
|
|
|
|
|
|
|
List<String> imgList = [ |
|
|
|
|
|
"https://fastly.picsum.photos/id/64/800/800.jpg?hmac=NBZ4_-vqzD6p25oCeaW0H5vH-ql9zzei-SqJNeUo1QU", |
|
|
|
|
|
"https://fastly.picsum.photos/id/985/800/800.jpg?hmac=DfRt99HFbMJ96DlN-poOhruWYRsexESE94ilLC3g1rU", |
|
|
|
|
|
"https://fastly.picsum.photos/id/703/800/800.jpg?hmac=-bRTkPxnsiQ5kCo2tfXj6tFrXMD7YnVx7bQ0STno3Tg" |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
int nowSelect = 0; |
|
|
|
|
|
|
|
|
|
|
|
List<String> tagList = [ |
|
|
|
|
|
"北京", "160cm", "想要甜甜的恋爱", "本科", "朋友圈摄影师", "英雄联盟", "流放之路", |
|
|
|
|
|
"CF", "DNA", "堡垒之夜", "SCP" |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int calculateAge(String birthdayStr) { |
|
|
|
|
|
final birthday = DateTime.parse(birthdayStr); // 自动识别 1996-1-20 |
|
|
|
|
|
final today = DateTime.now(); |
|
|
|
|
|
|
|
|
|
|
|
int age = today.year - birthday.year; |
|
|
|
|
|
|
|
|
|
|
|
// 如果今年生日还没过,年龄要减 1 |
|
|
|
|
|
if (today.month < birthday.month || |
|
|
|
|
|
(today.month == birthday.month && today.day < birthday.day)) { |
|
|
|
|
|
age--; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return age; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final userData = GlobalData().userData.obs; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
|
void initState() { |
|
|
|
|
|
super.initState(); |
|
|
|
|
|
userData.value = GlobalData().userData; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
@override |
|
|
Widget build(BuildContext context) { |
|
|
Widget build(BuildContext context) { |
|
|
return Scaffold( |
|
|
|
|
|
body: Stack( |
|
|
|
|
|
children: [ |
|
|
|
|
|
widget.userData.photoList.isNotEmpty ? CachedNetworkImage( |
|
|
|
|
|
imageUrl: "${widget.userData.photoList[nowSelect].photoUrl}?x-oss-process=image/format,webp", |
|
|
|
|
|
width: 375.w, |
|
|
|
|
|
height: 384.w, |
|
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
|
) : CachedNetworkImage( |
|
|
|
|
|
imageUrl: "${widget.userData.avatar}?x-oss-process=image/format,webp", |
|
|
|
|
|
width: 375.w, |
|
|
|
|
|
height: 384.w, |
|
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
|
), |
|
|
|
|
|
SingleChildScrollView( |
|
|
|
|
|
child: Container( |
|
|
|
|
|
padding: EdgeInsets.only(top: 361.w), |
|
|
|
|
|
child: Container( |
|
|
|
|
|
height: 812.h - 361.w, |
|
|
|
|
|
|
|
|
return GetX<UserInformationController>( |
|
|
|
|
|
init: UserInformationController(miId: miId, userId: userId), |
|
|
|
|
|
builder: (controller){ |
|
|
|
|
|
return controller.userData.value.id != null ? Scaffold( |
|
|
|
|
|
body: Stack( |
|
|
|
|
|
children: [ |
|
|
|
|
|
controller.userData.value.photoList!.isNotEmpty ? CachedNetworkImage( |
|
|
|
|
|
imageUrl: "${controller.userData.value.photoList![controller.nowSelect.value].photoUrl}?x-oss-process=image/format,webp", |
|
|
width: 375.w, |
|
|
width: 375.w, |
|
|
padding: EdgeInsets.only( |
|
|
|
|
|
top: 31.w, |
|
|
|
|
|
left: 15.w, |
|
|
|
|
|
right: 24.w |
|
|
|
|
|
), |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.vertical( |
|
|
|
|
|
top: Radius.circular(23.w) |
|
|
|
|
|
|
|
|
height: 384.w, |
|
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
|
) : CachedNetworkImage( |
|
|
|
|
|
imageUrl: "${controller.userData.value.profilePhoto}?x-oss-process=image/format,webp", |
|
|
|
|
|
width: 375.w, |
|
|
|
|
|
height: 384.w, |
|
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
|
), |
|
|
|
|
|
SingleChildScrollView( |
|
|
|
|
|
child: Container( |
|
|
|
|
|
padding: EdgeInsets.only(top: 361.w), |
|
|
|
|
|
child: Container( |
|
|
|
|
|
height: 812.h - 361.w, |
|
|
|
|
|
width: 375.w, |
|
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
|
top: 31.w, |
|
|
|
|
|
left: 15.w, |
|
|
|
|
|
right: 24.w |
|
|
), |
|
|
), |
|
|
color: Colors.white |
|
|
|
|
|
), |
|
|
|
|
|
child: Column( |
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.vertical( |
|
|
|
|
|
top: Radius.circular(23.w) |
|
|
|
|
|
), |
|
|
|
|
|
color: Colors.white |
|
|
|
|
|
), |
|
|
|
|
|
child: Column( |
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
children: [ |
|
|
children: [ |
|
|
Row( |
|
|
Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
children: [ |
|
|
children: [ |
|
|
Text( |
|
|
|
|
|
widget.userData.nickName, |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 19.w, |
|
|
|
|
|
color: const Color.fromRGBO(51, 51, 51, 1), |
|
|
|
|
|
fontWeight: FontWeight.w600 |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 13.w,), |
|
|
|
|
|
if(userData.value?.genderCode == 0) Container( |
|
|
|
|
|
width: 33.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
|
|
color: const Color.fromRGBO(255, 237, 255, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesFemale, |
|
|
|
|
|
width: 8.w, |
|
|
|
|
|
height: 8.w, |
|
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Text( |
|
|
|
|
|
controller.userData.value.nickName ?? "", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 19.w, |
|
|
|
|
|
color: const Color.fromRGBO(51, 51, 51, 1), |
|
|
|
|
|
fontWeight: FontWeight.w600 |
|
|
), |
|
|
), |
|
|
SizedBox(width: 2.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"${widget.userData.age}", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(255, 66, 236, 1) |
|
|
|
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 13.w,), |
|
|
|
|
|
if(controller.myUserData.value?.genderCode == 0) Container( |
|
|
|
|
|
width: 33.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
|
|
color: const Color.fromRGBO(255, 237, 255, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesFemale, |
|
|
|
|
|
width: 8.w, |
|
|
|
|
|
height: 8.w, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 2.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"${controller.userData.value.age}", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(255, 66, 236, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 3.w,), |
|
|
|
|
|
Container( |
|
|
|
|
|
width: 33.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
margin: EdgeInsets.only(right: 2.w), |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
|
|
color: const Color.fromRGBO(234, 255, 219, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: Text( |
|
|
|
|
|
"在线", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(38, 199, 124, 1) |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 3.w,), |
|
|
|
|
|
Container( |
|
|
|
|
|
width: 33.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
margin: EdgeInsets.only(right: 2.w), |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
|
|
color: const Color.fromRGBO(234, 255, 219, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: Text( |
|
|
|
|
|
"在线", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(38, 199, 124, 1) |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
|
|
|
SizedBox(width: 4.w,), |
|
|
|
|
|
if (controller.userData.value.identityCard != "" && controller.userData.value.identityCard != null) Container( |
|
|
|
|
|
width: 43.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
|
|
color: const Color.fromRGBO(246, 237, 255, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesRealName, |
|
|
|
|
|
width: 8.w, |
|
|
|
|
|
height: 7.w, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 2.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"实名", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(160, 92, 255, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 4.w,), |
|
|
|
|
|
if(controller.myUserData.value?.genderCode == 1) Container( |
|
|
|
|
|
width: 33.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
|
|
color: const Color.fromRGBO(237, 245, 255, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesMale, |
|
|
|
|
|
width: 8.w, |
|
|
|
|
|
height: 8.w, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 2.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"${controller.userData.value.age}", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(120, 140, 255, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
SizedBox(width: 4.w,), |
|
|
|
|
|
if (widget.userData.isRealNameCertified) Container( |
|
|
|
|
|
width: 43.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
width: 63.w, |
|
|
|
|
|
height: 27.w, |
|
|
decoration: BoxDecoration( |
|
|
decoration: BoxDecoration( |
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
|
|
color: const Color.fromRGBO(246, 237, 255, 1) |
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(27.w)), |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, .1) |
|
|
), |
|
|
), |
|
|
child: Row( |
|
|
child: Row( |
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
children: [ |
|
|
children: [ |
|
|
Image.asset( |
|
|
Image.asset( |
|
|
Assets.imagesRealName, |
|
|
|
|
|
width: 8.w, |
|
|
|
|
|
height: 7.w, |
|
|
|
|
|
|
|
|
Assets.imagesPlayer, |
|
|
|
|
|
width: 15.w, |
|
|
|
|
|
height: 15.w, |
|
|
), |
|
|
), |
|
|
SizedBox(width: 2.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"实名", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(160, 92, 255, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 4.w,), |
|
|
|
|
|
if(userData.value?.genderCode == 1) Container( |
|
|
|
|
|
width: 33.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
|
|
color: const Color.fromRGBO(237, 245, 255, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
|
SizedBox(width: 4.w,), |
|
|
Image.asset( |
|
|
Image.asset( |
|
|
Assets.imagesMale, |
|
|
|
|
|
width: 8.w, |
|
|
|
|
|
height: 8.w, |
|
|
|
|
|
|
|
|
Assets.imagesVoice, |
|
|
|
|
|
width: 15.w, |
|
|
|
|
|
height: 13.w, |
|
|
), |
|
|
), |
|
|
SizedBox(width: 2.w,), |
|
|
|
|
|
|
|
|
SizedBox(width: 4.w,), |
|
|
Text( |
|
|
Text( |
|
|
"${widget.userData.age}", |
|
|
|
|
|
|
|
|
"6'", |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(120, 140, 255, 1) |
|
|
|
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, 1) |
|
|
), |
|
|
), |
|
|
) |
|
|
) |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
|
|
|
) |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
Container( |
|
|
|
|
|
width: 63.w, |
|
|
|
|
|
height: 27.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(27.w)), |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, .1) |
|
|
|
|
|
|
|
|
SizedBox(height: 8.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"父母催婚找个结婚的", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
), |
|
|
), |
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesPlayer, |
|
|
|
|
|
width: 15.w, |
|
|
|
|
|
height: 15.w, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 4.w,), |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesVoice, |
|
|
|
|
|
width: 15.w, |
|
|
|
|
|
height: 13.w, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 4.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"6'", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 11.w,), |
|
|
|
|
|
Wrap( |
|
|
|
|
|
spacing: 7.w, |
|
|
|
|
|
runSpacing: 7.w, |
|
|
|
|
|
children: [ |
|
|
|
|
|
...controller.tagList.map((e){ |
|
|
|
|
|
return TagItem(label: e); |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 16.w,), |
|
|
|
|
|
if ((controller.userData.value.provinceName?.isNotEmpty ?? false)) Text( |
|
|
|
|
|
"IP属地:${controller.userData.value.provinceName}", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
), |
|
|
), |
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 8.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"父母催婚找个结婚的", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 11.w,), |
|
|
|
|
|
Wrap( |
|
|
|
|
|
spacing: 7.w, |
|
|
|
|
|
runSpacing: 7.w, |
|
|
|
|
|
children: [ |
|
|
|
|
|
...tagList.map((e){ |
|
|
|
|
|
return TagItem(label: e); |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 16.w,), |
|
|
|
|
|
if (widget.userData.provinceName.isNotEmpty) Text( |
|
|
|
|
|
"IP属地:${widget.userData.provinceName}", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Text( |
|
|
|
|
|
"动我ID:${widget.userData.userId}", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Spacer(), |
|
|
|
|
|
Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
InkWell( |
|
|
|
|
|
onTap: () { |
|
|
|
|
|
// 跳转到聊天页面,传递用户ID和用户数据模型 |
|
|
|
|
|
Get.to(() => ChatPage( |
|
|
|
|
|
userId: widget.userData.userId, |
|
|
|
|
|
userData: widget.userData, |
|
|
|
|
|
)); |
|
|
|
|
|
}, |
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 246.w, |
|
|
|
|
|
height: 38.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(38.w)), |
|
|
|
|
|
color: const Color.fromRGBO(51, 51, 51, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesChatBtn, |
|
|
|
|
|
width: 13.w, |
|
|
|
|
|
height: 12.w, |
|
|
|
|
|
|
|
|
), |
|
|
|
|
|
Text( |
|
|
|
|
|
"动我ID:${controller.userData.value.userId}", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 9.w, |
|
|
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Spacer(), |
|
|
|
|
|
Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
InkWell( |
|
|
|
|
|
onTap: () { |
|
|
|
|
|
// 跳转到聊天页面,传递用户ID和用户数据模型 |
|
|
|
|
|
// Get.to(() => ChatPage( |
|
|
|
|
|
// userId: userId, |
|
|
|
|
|
// userData: controller.userData.value, |
|
|
|
|
|
// )); |
|
|
|
|
|
}, |
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 246.w, |
|
|
|
|
|
height: 38.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(38.w)), |
|
|
|
|
|
color: const Color.fromRGBO(51, 51, 51, 1) |
|
|
), |
|
|
), |
|
|
SizedBox(width: 4.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"发消息", |
|
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesChatBtn, |
|
|
|
|
|
width: 13.w, |
|
|
|
|
|
height: 12.w, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(width: 4.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"发消息", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 15.w, |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Container( |
|
|
|
|
|
width: 81.w, |
|
|
|
|
|
height: 38.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(38.w)), |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: Text( |
|
|
|
|
|
"关注", |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
fontSize: 15.w, |
|
|
fontSize: 15.w, |
|
|
color: Colors.white, |
|
|
color: Colors.white, |
|
|
fontWeight: FontWeight.w500 |
|
|
fontWeight: FontWeight.w500 |
|
|
), |
|
|
), |
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Container( |
|
|
|
|
|
width: 81.w, |
|
|
|
|
|
height: 38.w, |
|
|
|
|
|
|
|
|
], |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Positioned( |
|
|
|
|
|
left: 0, |
|
|
|
|
|
top: MediaQuery.of(context).padding.top + 23, |
|
|
|
|
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 375.w, |
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 19.w), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
InkWell( |
|
|
|
|
|
onTap: (){ |
|
|
|
|
|
Get.back(); |
|
|
|
|
|
}, |
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 31.w, |
|
|
|
|
|
height: 31.w, |
|
|
decoration: BoxDecoration( |
|
|
decoration: BoxDecoration( |
|
|
borderRadius: BorderRadius.all(Radius.circular(38.w)), |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, 1) |
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(31.w)), |
|
|
|
|
|
color: const Color.fromRGBO(51, 51, 51, .5) |
|
|
), |
|
|
), |
|
|
child: Center( |
|
|
child: Center( |
|
|
child: Text( |
|
|
|
|
|
"关注", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 15.w, |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
child: Icon( |
|
|
|
|
|
Icons.keyboard_arrow_left, |
|
|
|
|
|
size: 23.w, |
|
|
|
|
|
color: Colors.white, |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
], |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Positioned( |
|
|
|
|
|
left: 0, |
|
|
|
|
|
top: MediaQuery.of(context).padding.top + 23, |
|
|
|
|
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 375.w, |
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 19.w), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
InkWell( |
|
|
|
|
|
onTap: (){ |
|
|
|
|
|
Get.back(); |
|
|
|
|
|
}, |
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 31.w, |
|
|
|
|
|
height: 31.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(31.w)), |
|
|
|
|
|
color: const Color.fromRGBO(51, 51, 51, .5) |
|
|
|
|
|
), |
|
|
), |
|
|
child: Center( |
|
|
|
|
|
child: Icon( |
|
|
|
|
|
Icons.keyboard_arrow_left, |
|
|
|
|
|
size: 23.w, |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
PopupMenuButton<String>( |
|
|
|
|
|
tooltip: "", |
|
|
|
|
|
padding: EdgeInsets.zero, |
|
|
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)), |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
elevation: 8, |
|
|
|
|
|
offset: Offset(0, 32.w), // 相对按钮下移一点 |
|
|
|
|
|
itemBuilder: (context) => [ |
|
|
|
|
|
const PopupMenuItem(value: 'report', child: Text('举报')), |
|
|
|
|
|
const PopupMenuItem(value: 'block', child: Text('拉黑')), |
|
|
|
|
|
], |
|
|
|
|
|
onSelected: (v) { |
|
|
|
|
|
if (v == 'report') { |
|
|
|
|
|
print("举报"); |
|
|
|
|
|
Get.to(() => ReportPage()); |
|
|
|
|
|
} else if (v == 'block') { |
|
|
|
|
|
print("拉黑"); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 31.w, |
|
|
|
|
|
height: 31.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(62.w)), |
|
|
|
|
|
color: const Color.fromRGBO(51, 51, 51, .5) |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: Icon( |
|
|
|
|
|
Icons.keyboard_control, |
|
|
|
|
|
size: 23.w, |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), // 你的小圆按钮 |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
PopupMenuButton<String>( |
|
|
|
|
|
tooltip: "", |
|
|
|
|
|
padding: EdgeInsets.zero, |
|
|
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)), |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
elevation: 8, |
|
|
|
|
|
offset: Offset(0, 32.w), // 相对按钮下移一点 |
|
|
|
|
|
itemBuilder: (context) => [ |
|
|
|
|
|
const PopupMenuItem(value: 'report', child: Text('举报')), |
|
|
|
|
|
const PopupMenuItem(value: 'block', child: Text('拉黑')), |
|
|
|
|
|
], |
|
|
], |
|
|
onSelected: (v) { |
|
|
|
|
|
if (v == 'report') { |
|
|
|
|
|
print("举报"); |
|
|
|
|
|
Get.to(() => ReportPage()); |
|
|
|
|
|
} else if (v == 'block') { |
|
|
|
|
|
print("拉黑"); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 31.w, |
|
|
|
|
|
height: 31.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(62.w)), |
|
|
|
|
|
color: const Color.fromRGBO(51, 51, 51, .5) |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: Icon( |
|
|
|
|
|
Icons.keyboard_control, |
|
|
|
|
|
size: 23.w, |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), // 你的小圆按钮 |
|
|
|
|
|
), |
|
|
), |
|
|
], |
|
|
|
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Positioned( |
|
|
|
|
|
left: 15.w, |
|
|
|
|
|
top: 310.w, |
|
|
|
|
|
width: 345.w, |
|
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
|
scrollDirection: Axis.horizontal, |
|
|
|
|
|
child: Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
...widget.userData.photoList.asMap().entries.map((entry){ |
|
|
|
|
|
return Container( |
|
|
|
|
|
margin: EdgeInsets.only(right: 7.w), |
|
|
|
|
|
child: InkWell( |
|
|
|
|
|
onTap: (){ |
|
|
|
|
|
nowSelect = entry.key; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
child: ClipRRect( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(7.w)), |
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 40.w, |
|
|
|
|
|
height: 40.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(7.w)), |
|
|
|
|
|
border: nowSelect == entry.key ? Border.all(width: 2.w, color: Colors.white) : null |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: CachedNetworkImage( |
|
|
|
|
|
imageUrl: "${entry.value.photoUrl}?x-oss-process=image/format,webp/resize,w_76", |
|
|
|
|
|
width: 38.w, |
|
|
|
|
|
height: 38.w, |
|
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
|
|
|
|
Positioned( |
|
|
|
|
|
left: 15.w, |
|
|
|
|
|
top: 310.w, |
|
|
|
|
|
width: 345.w, |
|
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
|
scrollDirection: Axis.horizontal, |
|
|
|
|
|
child: Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
...controller.userData.value.photoList!.asMap().entries.map((entry){ |
|
|
|
|
|
return Container( |
|
|
|
|
|
margin: EdgeInsets.only(right: 7.w), |
|
|
|
|
|
child: InkWell( |
|
|
|
|
|
onTap: (){ |
|
|
|
|
|
controller.nowSelect.value = entry.key; |
|
|
|
|
|
}, |
|
|
|
|
|
child: ClipRRect( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(7.w)), |
|
|
|
|
|
child: Container( |
|
|
|
|
|
width: 40.w, |
|
|
|
|
|
height: 40.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(7.w)), |
|
|
|
|
|
border: controller.nowSelect.value == entry.key ? Border.all(width: 2.w, color: Colors.white) : null |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: CachedNetworkImage( |
|
|
|
|
|
imageUrl: "${entry.value.photoUrl}?x-oss-process=image/format,webp/resize,w_76", |
|
|
|
|
|
width: 38.w, |
|
|
|
|
|
height: 38.w, |
|
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
); |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
) : SizedBox(); |
|
|
|
|
|
}, |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TagItem extends StatelessWidget { |
|
|
class TagItem extends StatelessWidget { |
|
|
final String label; |
|
|
final String label; |
|
|
const TagItem({super.key, required this.label}); |
|
|
const TagItem({super.key, required this.label}); |
|
|
|