Enstand stunde

This commit is contained in:
2023-04-20 17:00:06 +02:00
parent b0ec506147
commit d7a5e4a007
2 changed files with 15 additions and 12 deletions
+3 -3
View File
@@ -3,20 +3,20 @@ import 'package:intl/intl.dart';
class DetailPage extends StatelessWidget {
final String title;
final String datum;
final String description;
final Image? image;
const DetailPage({
Key? key,
required this.title,
required this.datum,
required this.description,
required this.image,
}) : super(key: key);
@override
Widget build(BuildContext context) {
final String formattedDate = DateFormat('dd.MM.yyyy').format(DateTime.now());
return Scaffold(
appBar: AppBar(
title: Text(title),
@@ -42,7 +42,7 @@ class DetailPage extends StatelessWidget {
Container(
padding: const EdgeInsets.only(left: 8.0, bottom: 8.0),
child: Text(
formattedDate,
datum,
style: const TextStyle(
fontSize: 18,
),
+9 -6
View File
@@ -18,8 +18,6 @@ class UserDefinedItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
String shortDescription = "${description.substring(0,34)}...";
return Padding(
padding: const EdgeInsets.symmetric(vertical: 1.0),
child: Card(
@@ -31,6 +29,7 @@ class UserDefinedItem extends StatelessWidget {
MaterialPageRoute(
builder: (context) => DetailPage(
title: title,
datum: datum,
description: description,
image: image != null ? image! : null,
),
@@ -58,7 +57,8 @@ class UserDefinedItem extends StatelessWidget {
title,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 20, // beliebige Schriftgröße
fontSize: 20,
fontWeight: FontWeight.bold// beliebige Schriftgröße
),
),
),
@@ -72,11 +72,14 @@ class UserDefinedItem extends StatelessWidget {
),
),
Padding(
padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8.0), // feste Höhe für 2 Zeilen
child: Flexible(
child: Text(
shortDescription,
description,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 18, // beliebige Schriftgröße
fontSize: 15,
),
),
),
),