From 731f78605794ea035338a716806004682a854900 Mon Sep 17 00:00:00 2001 From: Niklas Date: Fri, 29 Nov 2024 20:49:01 +0100 Subject: [PATCH] Reduced the title length to don't interfere with the picture --- lib/screens/subheader_Datepicker.dart | 2 +- lib/utils/helper_functions.dart | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/screens/subheader_Datepicker.dart b/lib/screens/subheader_Datepicker.dart index 97af93a..a9ea6ba 100644 --- a/lib/screens/subheader_Datepicker.dart +++ b/lib/screens/subheader_Datepicker.dart @@ -275,7 +275,7 @@ class EventCard2Section extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - shortenText(title, 30), + shortenText(title, 24), style: const TextStyle( color: Color(0xFF0A0A0A), fontSize: 18, diff --git a/lib/utils/helper_functions.dart b/lib/utils/helper_functions.dart index 185b5c9..3b65f19 100644 --- a/lib/utils/helper_functions.dart +++ b/lib/utils/helper_functions.dart @@ -21,13 +21,11 @@ String shortenText(String text, int maxLength) { return '$shortened ...'; } - - - class ScaleSize { - static double textScaleFactor(BuildContext context, {double maxTextScaleFactor = 2}) { + static double textScaleFactor(BuildContext context, + {double maxTextScaleFactor = 2}) { final width = MediaQuery.of(context).size.width; double val = (width / 1400) * maxTextScaleFactor; return max(1, min(val, maxTextScaleFactor)); } -} \ No newline at end of file +}