diff --git a/assets/images/Event_Images/Vector 6.svg b/assets/images/Event_Images/Vector 6.svg
new file mode 100644
index 0000000..bb2626e
--- /dev/null
+++ b/assets/images/Event_Images/Vector 6.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/images/Event_Images/Vector 7.svg b/assets/images/Event_Images/Vector 7.svg
new file mode 100644
index 0000000..c7c0a5e
--- /dev/null
+++ b/assets/images/Event_Images/Vector 7.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/images/Event_Images/unsplash_MxfcoxycH_Y.png b/assets/images/Event_Images/image01.png
similarity index 100%
rename from assets/images/Event_Images/unsplash_MxfcoxycH_Y.png
rename to assets/images/Event_Images/image01.png
diff --git a/assets/images/Event_Images/image02.jpg b/assets/images/Event_Images/image02.jpg
new file mode 100644
index 0000000..1e5c28c
Binary files /dev/null and b/assets/images/Event_Images/image02.jpg differ
diff --git a/assets/images/Event_Images/photo-1601312378427-822b2b41da35.avif b/assets/images/Event_Images/photo-1601312378427-822b2b41da35.avif
new file mode 100644
index 0000000..1e5c28c
Binary files /dev/null and b/assets/images/Event_Images/photo-1601312378427-822b2b41da35.avif differ
diff --git a/lib/screens/subheader_Datepicker.dart b/lib/screens/subheader_Datepicker.dart
index 9619445..8481c39 100644
--- a/lib/screens/subheader_Datepicker.dart
+++ b/lib/screens/subheader_Datepicker.dart
@@ -1,3 +1,5 @@
+import 'dart:math';
+
import 'package:Emma_home/utils/clipper.dart';
import 'package:flutter/material.dart';
import 'package:Emma_home/utils/helper_functions.dart';
@@ -197,7 +199,7 @@ class EventCard2Section extends StatelessWidget {
final Color color;
final MediaQueryData screen_size;
- const EventCard2Section({
+ EventCard2Section({
super.key,
required this.title,
required this.description,
@@ -206,6 +208,25 @@ class EventCard2Section extends StatelessWidget {
required this.color,
required this.screen_size,
});
+ List> clippers = [
+ BowClipper(),
+ WaveClipper(),
+ ConcavClipper()
+ ];
+ String getRandomImage() {
+ final List images = [
+ 'assets/images/Event_Images/image01.png',
+ 'assets/images/Event_Images/image01.png',
+ ];
+ final randomIndex = Random().nextInt(images.length);
+ return images[randomIndex];
+ }
+
+ CustomClipper _getRandomClipper() {
+ final randomIndex = Random().nextInt(clippers.length);
+ return clippers[randomIndex];
+ }
+
@override
Widget build(BuildContext context) {
return Container(
@@ -246,9 +267,9 @@ class EventCard2Section extends StatelessWidget {
right: 0,
top: 0,
child: ClipPath(
- clipper: MyClipper(),
+ clipper: _getRandomClipper(),
child: Image.asset(
- 'assets/images/Event_Images/unsplash_MxfcoxycH_Y.png', // Pfad zum Bild
+ getRandomImage(), // Pfad zum Bild
height: 110, // Höhe des Bildes
width: 130, // Breite des Bildes
fit: BoxFit.cover,
diff --git a/lib/utils/clipper.dart b/lib/utils/clipper.dart
index 1fc0872..258f655 100644
--- a/lib/utils/clipper.dart
+++ b/lib/utils/clipper.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
-class MyClipper extends CustomClipper {
+class WaveClipper extends CustomClipper {
@override
Path getClip(Size size) {
Paint paint = Paint();
@@ -35,3 +35,63 @@ class MyClipper extends CustomClipper {
@override
bool shouldReclip(CustomClipper oldClipper) => false;
}
+
+class BowClipper extends CustomClipper {
+ @override
+ Path getClip(Size size) {
+ Paint paint = Paint();
+ Path path = Path();
+
+ // Path number 1
+ path = Path();
+ path.lineTo(0, size.height);
+ path.cubicTo(0, size.height, 0, size.height, 0, size.height);
+ path.cubicTo(0, size.height, size.width * 0.89, size.height,
+ size.width * 0.89, size.height);
+ path.cubicTo(size.width, size.height, size.width, size.height, size.width,
+ size.height * 0.88);
+ path.cubicTo(size.width, size.height * 0.88, size.width, size.height * 0.11,
+ size.width, size.height * 0.11);
+ path.cubicTo(size.width, 0, size.width * 0.95, 0, size.width * 0.89, 0);
+ path.cubicTo(
+ size.width * 0.89, 0, size.width * 0.63, 0, size.width * 0.63, 0);
+ path.cubicTo(size.width * 0.11, size.height * 0.04, size.width * 0.04,
+ size.height * 0.68, 0, size.height);
+ path.cubicTo(0, size.height, 0, size.height, 0, size.height);
+ return path;
+ }
+
+ @override
+ bool shouldReclip(CustomClipper oldClipper) => false;
+}
+
+class ConcavClipper extends CustomClipper {
+ @override
+ Path getClip(Size size) {
+ Paint paint = Paint();
+ Path path = Path();
+
+ // Path number 1
+ path.lineTo(size.width * 0.16, size.height * 0.58);
+ path.cubicTo(size.width * 0.16, size.height * 0.16, size.width * 0.08,
+ size.height * 0.1, size.width * 0.03, 0);
+ path.cubicTo(
+ size.width * 0.03, 0, size.width * 0.93, 0, size.width * 0.93, 0);
+ path.cubicTo(size.width, 0, size.width, size.height * 0.05, size.width,
+ size.height * 0.07);
+ path.cubicTo(size.width, size.height * 0.07, size.width, size.height * 0.9,
+ size.width, size.height * 0.9);
+ path.cubicTo(size.width, size.height * 0.98, size.width * 0.95, size.height,
+ size.width * 0.93, size.height);
+ path.cubicTo(
+ size.width * 0.93, size.height, 0, size.height, 0, size.height);
+ path.cubicTo(size.width * 0.12, size.height * 0.9, size.width * 0.15,
+ size.height * 0.68, size.width * 0.16, size.height * 0.58);
+ path.cubicTo(size.width * 0.16, size.height * 0.58, size.width * 0.16,
+ size.height * 0.58, size.width * 0.16, size.height * 0.58);
+ return path;
+ }
+
+ @override
+ bool shouldReclip(CustomClipper oldClipper) => false;
+}
diff --git a/pubspec.lock b/pubspec.lock
index 56efa56..7af800c 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -37,18 +37,18 @@ packages:
dependency: transitive
description:
name: async
- sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
- version: "2.11.0"
+ version: "2.12.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
- sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
- version: "2.1.1"
+ version: "2.1.2"
characters:
dependency: transitive
description:
@@ -61,10 +61,10 @@ packages:
dependency: transitive
description:
name: clock
- sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
- version: "1.1.1"
+ version: "1.1.2"
collection:
dependency: transitive
description:
@@ -101,10 +101,10 @@ packages:
dependency: transitive
description:
name: fake_async
- sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev"
source: hosted
- version: "1.3.1"
+ version: "1.3.2"
ffi:
dependency: transitive
description:
@@ -396,10 +396,10 @@ packages:
dependency: transitive
description:
name: path
- sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
+ sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
- version: "1.9.0"
+ version: "1.9.1"
path_provider:
dependency: transitive
description:
@@ -601,10 +601,10 @@ packages:
dependency: transitive
description:
name: string_scanner
- sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
+ sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6"
url: "https://pub.dev"
source: hosted
- version: "1.3.0"
+ version: "1.4.0"
supabase:
dependency: transitive
description:
@@ -729,10 +729,10 @@ packages:
dependency: transitive
description:
name: vm_service
- sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
+ sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
- version: "14.3.0"
+ version: "14.3.1"
web:
dependency: transitive
description: