try fix height and font size

This commit is contained in:
Thomas Fransolet 2024-02-28 15:43:15 +01:00
parent 91ae2c3c01
commit b1dce4142d
2 changed files with 14 additions and 13 deletions

View File

@ -1,5 +1,6 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:provider/provider.dart';
@ -105,9 +106,10 @@ class EventListItem extends StatelessWidget {
),
const SizedBox(width: 5.0),
Text(
eventAgenda.dateFrom!.isAtSameMomentAs(eventAgenda.dateTo!) ? "${formatter.format(eventAgenda.dateFrom!)}": "${formatter.format(eventAgenda.dateFrom!)} - ${formatter.format(eventAgenda.dateTo!)}", // TODO
style: const TextStyle(
eventAgenda.dateFrom!.isAtSameMomentAs(eventAgenda.dateTo!) ? "${formatter.format(eventAgenda.dateFrom!)}": "${formatter.format(eventAgenda.dateFrom!)} - ${formatter.format(eventAgenda.dateTo!)}",
style: TextStyle(
color: kBackgroundColor,
fontSize: 12
),
),
],
@ -120,7 +122,9 @@ class EventListItem extends StatelessWidget {
],
),
),
Expanded(
Container(
height: size.height * 0.2,
constraints: BoxConstraints(maxHeight: 120),
child: Container(
width: size.width,
decoration: const BoxDecoration(
@ -134,19 +138,17 @@ class EventListItem extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Align(
alignment: Alignment.center,
child: AutoSizeText(
eventAgenda.name!,
style: TextStyle(fontSize: 14.0),
maxFontSize: 14,
),
AutoSizeText(
eventAgenda.name!.length > 40 ? eventAgenda.name!.substring(0, 40) + " ..." : eventAgenda.name!,
style: TextStyle(fontSize: 14.0),
maxFontSize: 14,
textAlign : TextAlign.center
),
AutoSizeText(
eventAgenda.type!,
maxFontSize: 12.0,
style: TextStyle(
fontSize: 11.0,
fontSize: 10.0,
color: Colors.grey,
),
),

View File

@ -244,8 +244,7 @@ class _EventPopupState extends State<EventPopup> {
markers: markers,
),
): SizedBox(),
Container(
color: Colors.green,
SizedBox(
width: size.width * 0.28,
height: size.height * 0.35,
child: Column(