import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import '../../../core/constants/assets.dart'; import '../../../core/theme/colors.dart'; import '../../../core/utils/size_config.dart'; class TenderActionButtons extends StatelessWidget { final VoidCallback? onLike; final VoidCallback? onDislike; final VoidCallback? onClose; final VoidCallback? onReject; final VoidCallback? onSubmit; final bool isLiked; final bool isDisliked; final bool rejected; final bool submitted; const TenderActionButtons({ super.key, this.onLike, this.onDislike, this.onClose, this.onReject, this.onSubmit, this.isLiked = false, this.isDisliked = false, this.rejected = false, this.submitted = false, }); @override Widget build(BuildContext context) { return Row( mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox(width: 16.0.w()), // Dislike button GestureDetector( onTap: onDislike, child: Column( children: [ SvgPicture.asset( width: 32.0.w(), height: 32.0.w(), fit: BoxFit.cover, AssetsManager.dislike, colorFilter: ColorFilter.mode( isDisliked ? AppColors.errorColor : AppColors.grey50, BlendMode.srcATop, ), ), SizedBox(height: 8.0.h()), Text( 'Like', style: TextStyle( fontSize: 12.0.sp(), fontWeight: FontWeight.w400, color: isDisliked ? AppColors.errorColor : AppColors.grey50, ), ), ], ), ), SizedBox(width: 32.0.w()), //reject button GestureDetector( onTap: onReject, child: Column( children: [ Container( width: 32.0.w(), height: 32.0.w(), decoration: BoxDecoration( shape: BoxShape.circle, border: Border.all( color: rejected ? AppColors.errorColor : AppColors.grey60, width: 1.5.w(), ), ), alignment: Alignment.center, child: Icon( Icons.close, color: rejected ? AppColors.errorColor : AppColors.grey60, size: 16, ), ), SizedBox(height: 8.0.h()), Text( 'Reject', style: TextStyle( fontSize: 12.0.sp(), fontWeight: FontWeight.w400, color: rejected ? AppColors.errorColor : AppColors.grey60, ), ), ], ), ), SizedBox(width: 32.0.w()), //submit button GestureDetector( onTap: onSubmit, child: Column( children: [ Container( width: 32.0.w(), height: 32.0.w(), decoration: BoxDecoration( shape: BoxShape.circle, border: Border.all( color: submitted ? AppColors.successColor : AppColors.grey60, width: 1.5.w(), ), ), alignment: Alignment.center, child: SvgPicture.asset( AssetsManager.tick, colorFilter: ColorFilter.mode( submitted ? AppColors.successColor : AppColors.grey60, BlendMode.srcATop, ), ), ), SizedBox(height: 8.0.h()), Text( 'Submit', style: TextStyle( fontSize: 12.0.sp(), fontWeight: FontWeight.w400, color: submitted ? AppColors.successColor : AppColors.grey60, ), ), ], ), ), SizedBox(width: 32.0.w()), // Like button GestureDetector( onTap: onLike, child: Column( children: [ SvgPicture.asset( width: 32.0.w(), height: 32.0.w(), fit: BoxFit.cover, AssetsManager.like, colorFilter: ColorFilter.mode( isLiked ? AppColors.successColor : AppColors.grey50, BlendMode.srcATop, ), ), SizedBox(height: 8.0.h()), Text( 'Like', style: TextStyle( fontSize: 12.0.sp(), fontWeight: FontWeight.w400, color: isLiked ? AppColors.successColor : AppColors.grey50, ), ), ], ), ), ], ); } }