Reduced the title length to don't interfere with the picture
This commit is contained in:
parent
79378be1f8
commit
731f786057
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue