Merge branch 'main' into Firebase
# Conflicts: # lib/AddPage.dart # lib/UserDefinedList.dart # pubspec.lock
This commit is contained in:
+72
-1
@@ -1,4 +1,74 @@
|
||||
import 'package:flutter/material.dart';
|
||||
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) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(title),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: image,
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(left: 8.0, bottom: 8.0),
|
||||
child: Text(
|
||||
datum,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
description,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*import 'package:flutter/material.dart';
|
||||
|
||||
class DetailPage extends StatelessWidget {
|
||||
final String title;
|
||||
@@ -48,4 +118,5 @@ class DetailPage extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
+64
-67
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'DetailPage.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
@@ -19,73 +18,74 @@ 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(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// Open a new screen when the user taps on the list item
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => DetailPage(
|
||||
title: title,
|
||||
description: description,
|
||||
image: image != null ? image! : null,
|
||||
),
|
||||
return Card(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// Open a new screen when the user taps on the list item
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => DetailPage(
|
||||
title: title,
|
||||
datum: datum,
|
||||
description: description,
|
||||
image: image != null ? image! : null,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 130,
|
||||
height: 130,
|
||||
child: image,
|
||||
),
|
||||
Flexible(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
title,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 20, // beliebige Schriftgröße
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
datum,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 120,
|
||||
height: 120,
|
||||
child: image,
|
||||
),
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
title,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 16, // beliebige Schriftgröße
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold// beliebige Schriftgröße
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
shortDescription,
|
||||
style: const TextStyle(
|
||||
fontSize: 18, // 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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -191,16 +191,13 @@ class IssueList extends StatelessWidget {
|
||||
//addUDI(item1);
|
||||
//addUDI(item2);
|
||||
return ListView(
|
||||
children: _items.map((item) => UserDefinedItem(
|
||||
children: _items.map((item) => UserDefinedItem(
|
||||
title: item.title,
|
||||
datum: item.datum,
|
||||
description: item.description,
|
||||
image: item.image,
|
||||
),
|
||||
).toList(),
|
||||
),
|
||||
).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user