import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:lba/gen/assets.gen.dart'; import 'package:lba/res/colors.dart'; import 'package:lba/widgets/buildWarpedInfo.dart'; import 'package:lba/widgets/rate.dart'; class Reviews extends StatelessWidget { final String name; final String comment; final double rate; final int yesCount; final int noCount; final String date; const Reviews({ super.key, required this.name, required this.comment, required this.rate, required this.yesCount, required this.noCount, required this.date, }); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(8.0), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Text(name), SizedBox(width: 2), Image.asset(Assets.images.usa.path), ], ), Text( "Verified Buyer", style: TextStyle(color: LightAppColors.confirmButton), ), ], ), CustomStarRating(rating: rate), ], ), SizedBox(height: 7), buildWrappedInfo( "", comment, ), SizedBox(height: 10,), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ InkWell( child: Row( children: [ SvgPicture.asset(Assets.icons.like.path), SizedBox(width: 1,), Text("Yes (${yesCount.toString()})",style: TextStyle( color: LightAppColors.hint, ),), ], ), ), SizedBox(width: 10,), InkWell( child: Row( children: [ SvgPicture.asset(Assets.icons.dislike.path), SizedBox(width: 1,), Text("No (${noCount.toString()})",style: TextStyle( color: LightAppColors.hint, ),), ], ), ), ], ), Text(date,style: TextStyle( color: LightAppColors.hint ),) ], ), SizedBox(height: 5,), Divider(thickness: 1.2, height: 2), ], ), ); } }