From cb67575bfe7a001893c0abc07d5290d8f4b71228 Mon Sep 17 00:00:00 2001 From: Reimar Date: Mon, 26 Aug 2024 21:56:15 +0200 Subject: [PATCH] Show favorite name and description on frontend --- Mobile/lib/favorites.dart | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Mobile/lib/favorites.dart b/Mobile/lib/favorites.dart index a5815f8..187c1f4 100644 --- a/Mobile/lib/favorites.dart +++ b/Mobile/lib/favorites.dart @@ -42,7 +42,8 @@ class _FavoritesPage extends State { child: Column(children: _favorites.map((favorite) => Container( width: double.infinity, - padding: const EdgeInsets.all(20.0), + padding: const EdgeInsets.all(20), + margin: const EdgeInsets.only(bottom: 10), decoration: const BoxDecoration( boxShadow: [ BoxShadow( @@ -53,7 +54,24 @@ class _FavoritesPage extends State { ], color: Colors.white ), - child: const Text('Favorittekst'), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Padding(padding: EdgeInsets.only(top: 3), child: Icon(Icons.star, color: Colors.yellow, size: 36)), + const SizedBox(width: 20), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(favorite.name, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 24)), + Text(favorite.description), + ], + ), + ), + const SizedBox(width: 20), + const Padding(padding: EdgeInsets.only(top: 5), child: Icon(Icons.delete, color: Colors.grey)), + ], + ), )).toList(), ), ),