You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

68 lines
2.2 KiB

import 'package:cached_network_image/cached_network_image.dart';
import 'package:dating_touchme_app/extension/ex_widget.dart';
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/user_information_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
class MatchmakerItem extends StatefulWidget {
final MarriageData item;
const MatchmakerItem({super.key, required this.item});
@override
State<MatchmakerItem> createState() => _MatchmakerItemState();
}
class _MatchmakerItemState extends State<MatchmakerItem> {
@override
Widget build(BuildContext context) {
return Stack(
clipBehavior: Clip.none,
children: [
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(40.w)),
child: widget.item.profilePhoto != "" ? CachedNetworkImage(
imageUrl: widget.item.profilePhoto,
width: 40.w,
height: 40.w,
fit: BoxFit.cover,
) : Image.asset(
Assets.imagesUserAvatar,
width: 40.w,
height: 40.w,
fit: BoxFit.cover,
),
),
Positioned(
left: -3.w,
bottom: -3.w,
child: Container(
width: 46.w,
height: 14.w,
padding: EdgeInsets.symmetric(horizontal: 5.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(14.w)),
color: const Color.fromRGBO(0, 0, 0, .4)
),
child: Center(
child: Text(
widget.item.nickName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 9.w,
fontWeight: FontWeight.w500,
color: Colors.white
),
),
),
),
)
],
).onTap((){
Get.to(() => UserInformationPage(miId: widget.item.miId, userId: widget.item.userId,));
});
}
}