add fitted box around title

This commit is contained in:
2025-05-29 14:57:30 +02:00
parent 607cb35603
commit bb81d29cf7

View File

@@ -121,13 +121,16 @@ class _MihPackageState extends State<MihPackage>
child: Container( child: Container(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
// color: Colors.black, // color: Colors.black,
child: Text( child: FittedBox(
widget.appToolTitles != null child: Text(
? widget.appToolTitles![widget.selectedbodyIndex] widget.appToolTitles != null
: "", ? widget
style: const TextStyle( .appToolTitles![widget.selectedbodyIndex]
fontSize: 23, : "",
fontWeight: FontWeight.w600, style: const TextStyle(
fontSize: 23,
fontWeight: FontWeight.w600,
),
), ),
), ),
), ),
@@ -154,35 +157,6 @@ class _MihPackageState extends State<MihPackage>
}, },
), ),
), ),
// 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],
// )
// ],
// ),
// )),
], ],
), ),
), ),