From 68c806408312ba47e03c22e137c9c319c9004463 Mon Sep 17 00:00:00 2001 From: Reimar Date: Fri, 13 Sep 2024 12:12:58 +0200 Subject: [PATCH] Show profile picture on reviews --- Mobile/lib/reviewlist.dart | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Mobile/lib/reviewlist.dart b/Mobile/lib/reviewlist.dart index 13f5fd0..edbd566 100644 --- a/Mobile/lib/reviewlist.dart +++ b/Mobile/lib/reviewlist.dart @@ -80,9 +80,23 @@ class _ReviewListState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Padding( - padding: EdgeInsets.only(top: 3), - child: Icon(Icons.rate_review, color: Colors.purple, size: 36), + Padding( + padding: const EdgeInsets.only(top: 3), + child: + _getReviewUser(review)?.profilePicture.isNotEmpty == true + ? ClipOval( + child: Image( + image: NetworkImage(_getReviewUser(review)!.profilePicture), + height: 36, + width: 36, + fit: BoxFit.cover, + ), + ) + : const Icon( + Icons.account_circle, + size: 36, + color: Colors.grey, + ) ), const SizedBox(width: 20), Expanded(