Flexible Exceptions behoben
This commit is contained in:
@@ -4,6 +4,8 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
|
||||||
class AddScreen extends StatefulWidget {
|
class AddScreen extends StatefulWidget {
|
||||||
|
const AddScreen({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_AddScreenState createState() => _AddScreenState();
|
_AddScreenState createState() => _AddScreenState();
|
||||||
}
|
}
|
||||||
|
|||||||
+59
-62
@@ -18,77 +18,74 @@ class UserDefinedItem extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Card(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 1.0),
|
child: InkWell(
|
||||||
child: Card(
|
onTap: () {
|
||||||
child: InkWell(
|
// Open a new screen when the user taps on the list item
|
||||||
onTap: () {
|
Navigator.push(
|
||||||
// Open a new screen when the user taps on the list item
|
context,
|
||||||
Navigator.push(
|
MaterialPageRoute(
|
||||||
context,
|
builder: (context) => DetailPage(
|
||||||
MaterialPageRoute(
|
title: title,
|
||||||
builder: (context) => DetailPage(
|
datum: datum,
|
||||||
title: title,
|
description: description,
|
||||||
datum: datum,
|
image: image != null ? image! : null,
|
||||||
description: description,
|
|
||||||
image: image != null ? image! : null,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
},
|
);
|
||||||
child: Row(
|
},
|
||||||
children: [
|
child: Row(
|
||||||
SizedBox(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
width: 120,
|
children: [
|
||||||
height: 120,
|
SizedBox(
|
||||||
child: image,
|
width: 120,
|
||||||
),
|
height: 120,
|
||||||
Flexible(
|
child: image,
|
||||||
child: Column(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
Flexible(
|
||||||
children: [
|
flex: 1,
|
||||||
Padding(
|
child: Column(
|
||||||
padding: const EdgeInsets.all(8.0),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Row(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
Padding(
|
||||||
children: [
|
padding: const EdgeInsets.all(8.0),
|
||||||
Flexible(
|
child: Row(
|
||||||
child: Text(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
title,
|
children: [
|
||||||
overflow: TextOverflow.ellipsis,
|
Flexible(
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold// beliebige Schriftgröße
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
datum,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 15, // beliebige Schriftgröße
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0), // feste Höhe für 2 Zeilen
|
|
||||||
child: Flexible(
|
|
||||||
child: Text(
|
child: Text(
|
||||||
description,
|
title,
|
||||||
maxLines: 3,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold// beliebige Schriftgröße
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Text(
|
||||||
|
datum,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 15, // beliebige Schriftgröße
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0), // feste Höhe für 2 Zeilen
|
||||||
|
child: Text(
|
||||||
|
description,
|
||||||
|
maxLines: 3,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user