Implemented breaking points for varios screen sizes

This commit is contained in:
2024-12-03 00:54:49 +01:00
parent 69675f42e2
commit 634ecce4d9
5 changed files with 185 additions and 83 deletions

View File

@@ -30,7 +30,10 @@ class ContentListTile extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
if (name != null) Text(name!),
if (name != null)
Text(
name!,
),
if (location != null) Text(', $location'),
if (title != null && Breakpoints.xl < width) Text(' - $title'),
],
@@ -39,8 +42,26 @@ class ContentListTile extends StatelessWidget {
],
),
titleAlignment: ListTileTitleAlignment.titleHeight,
subtitle: description != null ? Text(description!) : null,
trailing: startDate != null && endDate != null
subtitle: description != null
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Padding(padding: EdgeInsets.only(top: 8)),
if (startDate != null &&
endDate != null &&
Breakpoints.sm >= width)
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: Text(
_getTimeString(startDate!, endDate!),
style: Theme.of(context).textTheme.labelSmall,
),
),
Text(description!),
],
)
: null,
trailing: startDate != null && endDate != null && Breakpoints.sm < width
? Text(_getTimeString(startDate!, endDate!))
: null,
);