From 15f18f9a5a268e2f524546c10c6848812670f425 Mon Sep 17 00:00:00 2001 From: Fransolet Thomas Date: Thu, 30 Mar 2023 17:40:43 +0200 Subject: [PATCH] Show number in section --- .../Configurations/listView_card_section.dart | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/lib/Screens/Configurations/listView_card_section.dart b/lib/Screens/Configurations/listView_card_section.dart index 131623f..777898c 100644 --- a/lib/Screens/Configurations/listView_card_section.dart +++ b/lib/Screens/Configurations/listView_card_section.dart @@ -50,16 +50,41 @@ class _ListViewCardSectionsState extends State { width: 150, height: 150, decoration: boxDecoration(sectionDTO, appContext), - padding: const EdgeInsets.all(5), - //margin: EdgeInsets.symmetric(vertical: 15, horizontal: 15), - child: Align( - alignment: Alignment.center, - child: getDetails(sectionDTO, size), + child: Stack( + children: [ + Align( + alignment: Alignment.bottomLeft, + child: Container( + padding: const EdgeInsets.symmetric( + horizontal: 13, // 30 padding + vertical: 5, // 5 top and bottom + ), + decoration: const BoxDecoration( + color: kPrimaryColor, + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(10), + topRight: Radius.circular(22), + ), + ), + child: Text( + "${sectionDTO.order+1}", + style: const TextStyle(color: Colors.white) + ), + ), + ), + Padding( + padding: const EdgeInsets.all(5.0), + child: Align( + alignment: Alignment.center, + child: getDetails(sectionDTO, size), + ), + ), + ], ), ); } - getDetails(dynamic element, Size size) { + getDetails(SectionDTO element, Size size) { return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween,