From bb81d29cf727589c2b7c6fb0bb13a585b00c3ad8 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 29 May 2025 14:57:30 +0200 Subject: [PATCH] add fitted box around title --- .../mih_package_components/mih_package.dart | 46 ++++--------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/Frontend/lib/mih_components/mih_package_components/mih_package.dart b/Frontend/lib/mih_components/mih_package_components/mih_package.dart index ccec1656..780f2599 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_package.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_package.dart @@ -121,13 +121,16 @@ class _MihPackageState extends State child: Container( alignment: Alignment.centerRight, // color: Colors.black, - child: Text( - widget.appToolTitles != null - ? widget.appToolTitles![widget.selectedbodyIndex] - : "", - style: const TextStyle( - fontSize: 23, - fontWeight: FontWeight.w600, + child: FittedBox( + child: Text( + widget.appToolTitles != null + ? widget + .appToolTitles![widget.selectedbodyIndex] + : "", + style: const TextStyle( + fontSize: 23, + fontWeight: FontWeight.w600, + ), ), ), ), @@ -154,35 +157,6 @@ class _MihPackageState extends State }, ), ), - // Expanded( - // child: SwipeDetector( - // onSwipeLeft: (offset) { - // if (widget.selectedbodyIndex < - // widget.appTools.tools.length - 1) { - // setState(() { - // widget.selectedbodyIndex += 1; - // widget.onIndexChange(widget.selectedbodyIndex); - // }); - // } - // // print("swipe left"); - // }, - // onSwipeRight: (offset) { - // if (widget.selectedbodyIndex > 0) { - // setState(() { - // widget.selectedbodyIndex -= 1; - // widget.onIndexChange(widget.selectedbodyIndex); - // }); - // } - // // print("swipe right"); - // }, - // child: Row( - // children: [ - // Expanded( - // child: widget.appBody[widget.selectedbodyIndex], - // ) - // ], - // ), - // )), ], ), ),