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