import 'package:flutter/material.dart'; import 'package:common_project/common_project.dart'; /** * des: */ class ShowPersonInfoDiaWidget { static void showRoomUserInfoDia(BuildContext context, String userId) async { TimiUserInfo model = await PublicApi.getUserInfo(userId: userId); if (model.success == true && model.data != null){ DialogAddWidget( context: context, gravity: Gravity.bottom, decoration: BoxDecoration( color: Colors.transparent ), borderRadius: 0.0, barrierColor: Colors.transparent, backgroundColor: Colors.transparent, widget: Container( width: Sizes.width, color: Colors.transparent, child: Column( children: [ stackContent(model.data), Container(width: Sizes.width,color: Colors.red,height: 1.h,), // content([PersonApplyItem("关注",null),PersonApplyItem("私信", null),PersonApplyItem("@TA", null),PersonApplyItem("送礼物", null),PersonApplyItem("上麦", "room_icon_up")],context) ], ), ) ); } } Widget _sexAgewealthLevelstarLevel( int age, int sex, wealthLevel, starLevel){ return Row( children: [ _ageWidget(age,sex), Image.asset("assets/money_icon/label_caifu_lv${wealthLevel}.png", width: 64.w,height: 40.h,package: ModuleName.Module_project,), Image.asset("assets/money_icon/label_meili_lv${starLevel}.png", width: 64.w,height: 40.h,package: ModuleName.Module_project,) ], ); } static Widget _ageWidget( int age, int userSex){ return Container( height: 40.h, child: Stack( alignment: Alignment.centerRight, children: [ // Image.asset(bloc.state.user!.data!.userSex! == 0?"label_gender_boy":"setting",package: ModuleName.Module_Me,width: 64.w,height: 40.h), Image.asset(userSex == 1? "assets/other_icon/label_gender_boy.png":"assets/other_icon/label_gender_gril.png",width: 64.w,height: 40.h,package: ModuleName.Module_project), Positioned( right: 8.w, child: Text("${age}",style: TextStyle(fontSize: Sizes.fs_20,color: Colors.white),)) ],), ); } static Widget content(List items, context){ return Container( width: Sizes.width, color: HexColor.fromHex("#2F3243"), padding: EdgeInsets.only(left: 64.w,bottom: 80.h,top: 26.h), child: Wrap( spacing: 94.w, runSpacing: 40.h, children: items.map((e) { return InkWell( child: Container( child: e.img != null? Column( children: [ ImageUtil.loadImage(ImageUtil.getImgPath(e.img!),package: ModuleName.Module_chat,width: 48.w,height: 48.w), Text("${e.title}",style: TextStyle(fontSize: Sizes.fs_32,color: Colors.white),), ], ):Text("${e.title}",style: TextStyle(fontSize: Sizes.fs_32,color: Colors.white),) ), onTap: (){ DialogAddWidget( context: context, gravity: Gravity.bottom, decoration: BoxDecoration( color: Colors.transparent ), borderRadius: 0.0, barrierColor: Colors.transparent, backgroundColor: Colors.transparent, widget: Container( width: Sizes.width, height: 300.h, color: Colors.red, ) ); }, ); }).toList(), ), ); } static Stack stackContent(UserInfoData model) { return Stack( alignment: Alignment.center, children: [ Container( margin: EdgeInsets.only(top: 70.h), width: Sizes.width, height: 330.h, decoration: BoxDecoration( borderRadius: BorderRadius.only(topLeft: Radius.circular(30.w),topRight: Radius.circular(30.w)), color: HexColor.fromHex("#2F3243"), ), ), Container( child: Column( children: [ Stack( alignment: Alignment.center, children: [ Container( width: 150.w, height: 150.w, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(75.w)), color: HexColor.fromHex("#2F3243") ), ), ClipOval(child: ImageUtil.loadImage("${model.userAvatar}",width: 144.w,height: 144.w),), ], ), Container( margin: EdgeInsets.only(top: 16.h), child: Text("我是小可爱",style: TextStyle(fontSize: Sizes.fs_36,color: Colors.white),),), Container( alignment: Alignment.center, child: Row( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ _ageWidget(model.userAge!,model.userSex!), SizedBox(width: 10.w,), Image.asset("assets/money_icon/label_caifu_lv${model.wealthLevel}.png", width: 64.w,height: 40.h,package: ModuleName.Module_project,), SizedBox(width: 10.w,), Image.asset("assets/money_icon/label_meili_lv${model.starLevel}.png", width: 64.w,height: 40.h,package: ModuleName.Module_project,), ],),), SizedBox(height: 32.h,), Container(child: Text("ID: ${model.userId} 粉丝: ${model.followCount}",style: TextStyle(fontSize: Sizes.fs_24,color: Colors.white.withOpacity(0.5)),) ,), SizedBox(height: 10.h,), Container( margin: EdgeInsets.only(bottom: Sizes.bottomSafeHeight), child: Text("${model.userSign}",style: TextStyle(fontSize: Sizes.fs_24,color: Colors.white.withOpacity(0.5)),),), ], ),), Positioned( left: 32.w, top: 100.h, child: Text("举报",style: TextStyle(fontSize: Sizes.fs_24,color: Colors.white.withOpacity(0.5)),)) ], ); } } class PersonApplyItem { String? title; String? img; PersonApplyItem(this.title,this.img); }