|
|
|
@ -4,7 +4,9 @@ import 'package:dating_touchme_app/controller/home/user_information_controller.d |
|
|
|
import 'package:dating_touchme_app/generated/assets.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/timeline_item.dart'; |
|
|
|
import 'package:dating_touchme_app/pages/message/chat_page.dart'; |
|
|
|
import 'package:easy_refresh/easy_refresh.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
@ -139,249 +141,299 @@ class UserInformationPage extends StatelessWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
DraggableScrollableSheet( |
|
|
|
initialChildSize: 0.55, // 初始露出高度(占屏幕比例) |
|
|
|
minChildSize: 0.55, // 最小(不想下滑回去就设成一样) |
|
|
|
maxChildSize: 0.95, |
|
|
|
builder: (context, scrollController){ |
|
|
|
return Stack( |
|
|
|
clipBehavior: Clip.none, |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
height: 812.h - 361.w - 50, |
|
|
|
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) |
|
|
|
EasyRefresh( |
|
|
|
|
|
|
|
controller: controller.listRefreshController, |
|
|
|
header: const ClassicHeader( |
|
|
|
dragText: '下拉刷新', |
|
|
|
armedText: '释放刷新', |
|
|
|
readyText: '刷新中...', |
|
|
|
processingText: '刷新中...', |
|
|
|
processedText: '刷新完成', |
|
|
|
failedText: '刷新失败', |
|
|
|
noMoreText: '没有更多数据', |
|
|
|
showMessage: false |
|
|
|
), |
|
|
|
footer: ClassicFooter( |
|
|
|
dragText: '上拉加载', |
|
|
|
armedText: '释放加载', |
|
|
|
readyText: '加载中...', |
|
|
|
processingText: '加载中...', |
|
|
|
processedText: '加载完成', |
|
|
|
failedText: '加载失败', |
|
|
|
noMoreText: '没有更多数据', |
|
|
|
showMessage: false |
|
|
|
), |
|
|
|
// 下拉刷新 |
|
|
|
onRefresh: () async { |
|
|
|
print('推荐列表下拉刷新被触发'); |
|
|
|
controller.page.value = 1; |
|
|
|
controller.postList.clear(); |
|
|
|
await controller.getPostList(); |
|
|
|
controller.listRefreshController.finishRefresh(IndicatorResult.success); |
|
|
|
controller.listRefreshController.finishLoad(IndicatorResult.none); |
|
|
|
}, |
|
|
|
// 上拉加载更多 |
|
|
|
onLoad: () async { |
|
|
|
print('推荐列表上拉加载被触发, hasMore: '); |
|
|
|
controller.page.value += 1; |
|
|
|
await controller.getPostList(); |
|
|
|
}, |
|
|
|
child: DraggableScrollableSheet( |
|
|
|
initialChildSize: 0.55, // 初始露出高度(占屏幕比例) |
|
|
|
minChildSize: 0.55, // 最小(不想下滑回去就设成一样) |
|
|
|
maxChildSize: 0.95, |
|
|
|
builder: (context, scrollController){ |
|
|
|
return SingleChildScrollView( |
|
|
|
clipBehavior: Clip.none, |
|
|
|
controller: scrollController, |
|
|
|
child: Stack( |
|
|
|
clipBehavior: Clip.none, |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 375.w, |
|
|
|
constraints: BoxConstraints( |
|
|
|
minHeight: 812.h, |
|
|
|
), |
|
|
|
color: Colors.white |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
padding: EdgeInsets.only( |
|
|
|
top: 31.w, |
|
|
|
left: 15.w, |
|
|
|
right: 24.w |
|
|
|
), |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.vertical( |
|
|
|
top: Radius.circular(23.w) |
|
|
|
), |
|
|
|
color: Colors.white |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
controller.userData.value.nickName ?? "", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 22.w, |
|
|
|
color: const Color.fromRGBO(51, 51, 51, 1), |
|
|
|
fontWeight: FontWeight.w600 |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 13.w,), |
|
|
|
if(controller.userData.value?.genderCode == 1) 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.calculateAge( |
|
|
|
(controller.userData.value.birthDate != null && controller.userData.value.birthDate!.isNotEmpty) ? |
|
|
|
(controller.userData.value.birthDate ?? "") : controller.userData.value.birthYear != null && controller.userData.value.birthYear!.isNotEmpty ? |
|
|
|
"${controller.userData.value.birthYear}-01-01" : "") |
|
|
|
}", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.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( |
|
|
|
"在线", |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
controller.userData.value.nickName ?? "", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.w, |
|
|
|
color: const Color.fromRGBO(38, 199, 124, 1) |
|
|
|
fontSize: 22.w, |
|
|
|
color: const Color.fromRGBO(51, 51, 51, 1), |
|
|
|
fontWeight: FontWeight.w600 |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
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: 13.w,), |
|
|
|
if(controller.userData.value?.genderCode == 1) Container( |
|
|
|
width: 33.w, |
|
|
|
height: 13.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(13.w)), |
|
|
|
color: const Color.fromRGBO(255, 237, 255, 1) |
|
|
|
), |
|
|
|
SizedBox(width: 2.w,), |
|
|
|
Text( |
|
|
|
"实名", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.w, |
|
|
|
color: const Color.fromRGBO(160, 92, 255, 1) |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 4.w,), |
|
|
|
if(controller.userData.value?.genderCode == 0) 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, |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
Image.asset( |
|
|
|
Assets.imagesFemale, |
|
|
|
width: 8.w, |
|
|
|
height: 8.w, |
|
|
|
), |
|
|
|
SizedBox(width: 2.w,), |
|
|
|
Text( |
|
|
|
"${ |
|
|
|
controller.calculateAge( |
|
|
|
(controller.userData.value.birthDate != null && controller.userData.value.birthDate!.isNotEmpty) ? |
|
|
|
(controller.userData.value.birthDate ?? "") : controller.userData.value.birthYear != null && controller.userData.value.birthYear!.isNotEmpty ? |
|
|
|
"${controller.userData.value.birthYear}-01-01" : "") |
|
|
|
}", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.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) |
|
|
|
), |
|
|
|
SizedBox(width: 2.w,), |
|
|
|
Text( |
|
|
|
"${controller.calculateAge(controller.userData.value.birthDate ?? (controller.userData.value.birthYear != null && controller.userData.value.birthYear!.isNotEmpty ? "${controller.userData.value.birthYear}-01-01" : ""))}", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.w, |
|
|
|
color: const Color.fromRGBO(120, 140, 255, 1) |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"在线", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.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: 11.w, |
|
|
|
color: const Color.fromRGBO(160, 92, 255, 1) |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 4.w,), |
|
|
|
if(controller.userData.value?.genderCode == 0) 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.calculateAge(controller.userData.value.birthDate ?? (controller.userData.value.birthYear != null && controller.userData.value.birthYear!.isNotEmpty ? "${controller.userData.value.birthYear}-01-01" : ""))}", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.w, |
|
|
|
color: const Color.fromRGBO(120, 140, 255, 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) |
|
|
|
// ), |
|
|
|
// 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: 8.w,), |
|
|
|
Text( |
|
|
|
(miId == GlobalData().userData!.id && GlobalData().userData!.auditDescribeInfo != null && GlobalData().userData!.auditDescribeInfo != "") ? (GlobalData().userData!.auditDescribeInfo ?? "") : (controller.userData.value.describeInfo ?? "我想找一个有缘的异性,快来联系我吧。"), |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(height: 11.w,), |
|
|
|
Wrap( |
|
|
|
spacing: 12.w, |
|
|
|
runSpacing: 12.w, |
|
|
|
children: [ |
|
|
|
...controller.tagList.map((e){ |
|
|
|
return TagItem(label: e); |
|
|
|
}), |
|
|
|
SizedBox(height: 8.w,), |
|
|
|
Text( |
|
|
|
(miId == GlobalData().userData!.id && GlobalData().userData!.auditDescribeInfo != null && GlobalData().userData!.auditDescribeInfo != "") ? (GlobalData().userData!.auditDescribeInfo ?? "") : (controller.userData.value.describeInfo ?? "我想找一个有缘的异性,快来联系我吧。"), |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(height: 11.w,), |
|
|
|
Wrap( |
|
|
|
spacing: 12.w, |
|
|
|
runSpacing: 12.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: 12.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"趣恋恋ID:${controller.userData.value.miUserId}", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
height: 1, |
|
|
|
color: const Color.fromRGBO(0, 0, 0, .3), |
|
|
|
margin: EdgeInsets.symmetric(vertical: 15.w), |
|
|
|
), |
|
|
|
Obx( |
|
|
|
() { |
|
|
|
return Column( |
|
|
|
children: [ |
|
|
|
...[ |
|
|
|
...controller.postList.map((e){ |
|
|
|
return TimelineItem(item: e); |
|
|
|
}), |
|
|
|
if(controller.postList.isEmpty) Center( |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
Image.asset( |
|
|
|
Assets.imagesNoMoreTimeline, |
|
|
|
width: 90.w, |
|
|
|
height: 112.w, |
|
|
|
), |
|
|
|
SizedBox(height: 5.w,), |
|
|
|
Text( |
|
|
|
"暂无动态", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.w, |
|
|
|
color: const Color.fromRGBO(186, 186, 186, 1) |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
], |
|
|
|
); |
|
|
|
} |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
SizedBox(height: 16.w,), |
|
|
|
if ((controller.userData.value.provinceName?.isNotEmpty ?? false)) Text( |
|
|
|
"IP属地:${controller.userData.value.provinceName}", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"趣恋恋ID:${controller.userData.value.miUserId}", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
left: 15.w, |
|
|
|
top: -60.w, |
|
|
|
child: ClipRRect( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(90.w)), |
|
|
|
child: Container( |
|
|
|
width: 90.w, |
|
|
|
height: 90.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(90.w)), |
|
|
|
border: Border.all(width: 3.w, color: Colors.white) |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
left: 15.w, |
|
|
|
top: -60.w, |
|
|
|
child: ClipRRect( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(84.w)), |
|
|
|
child: CachedNetworkImage( |
|
|
|
imageUrl: "${controller.userData.value.profilePhoto}?x-oss-process=image/format,webp", |
|
|
|
width: 84.w, |
|
|
|
height: 84.w, |
|
|
|
fit: BoxFit.cover, |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(90.w)), |
|
|
|
child: Container( |
|
|
|
width: 90.w, |
|
|
|
height: 90.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(90.w)), |
|
|
|
border: Border.all(width: 3.w, color: Colors.white) |
|
|
|
), |
|
|
|
child: ClipRRect( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(84.w)), |
|
|
|
child: CachedNetworkImage( |
|
|
|
imageUrl: "${controller.userData.value.profilePhoto}?x-oss-process=image/format,webp", |
|
|
|
width: 84.w, |
|
|
|
height: 84.w, |
|
|
|
fit: BoxFit.cover, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
); |
|
|
|
}, |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
); |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
left: 0, |
|
|
|
|