diff --git a/assets/images/Event_Images/Vector 8.svg b/assets/images/Event_Images/Vector 8.svg new file mode 100644 index 0000000..ed81591 --- /dev/null +++ b/assets/images/Event_Images/Vector 8.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/Event_Images/unsplash_MxfcoxycH_Y.png b/assets/images/Event_Images/unsplash_MxfcoxycH_Y.png new file mode 100644 index 0000000..586640b Binary files /dev/null and b/assets/images/Event_Images/unsplash_MxfcoxycH_Y.png differ diff --git a/lib/screens/subheader_Datepicker.dart b/lib/screens/subheader_Datepicker.dart index a9ea6ba..9619445 100644 --- a/lib/screens/subheader_Datepicker.dart +++ b/lib/screens/subheader_Datepicker.dart @@ -1,3 +1,4 @@ +import 'package:Emma_home/utils/clipper.dart'; import 'package:flutter/material.dart'; import 'package:Emma_home/utils/helper_functions.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -231,7 +232,7 @@ class EventCard2Section extends StatelessWidget { ), child: Stack( children: [ - Positioned( + /* Positioned( right: 0, top: 0, child: Image.asset( @@ -239,7 +240,20 @@ class EventCard2Section extends StatelessWidget { height: 110, // Höhe des Bildes width: 130, // Breite des Bildes ), - ), + ), */ + + Positioned( + right: 0, + top: 0, + child: ClipPath( + clipper: MyClipper(), + child: Image.asset( + 'assets/images/Event_Images/unsplash_MxfcoxycH_Y.png', // Pfad zum Bild + height: 110, // Höhe des Bildes + width: 130, // Breite des Bildes + fit: BoxFit.cover, + ), + )), //Bookmark Button Positioned( // Bookmark Button diff --git a/lib/utils/clipper.dart b/lib/utils/clipper.dart new file mode 100644 index 0000000..1fc0872 --- /dev/null +++ b/lib/utils/clipper.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; + +class MyClipper extends CustomClipper { + @override + Path getClip(Size size) { + Paint paint = Paint(); + Path path = Path(); + + // Path number 1 + path = Path(); + path.lineTo(size.width * 0.05, size.height * 0.3); + path.cubicTo(-0.03, size.height * 0.18, size.width * 0.02, + size.height * 0.05, size.width * 0.05, 0); + path.cubicTo( + size.width * 0.05, 0, size.width * 0.92, 0, size.width * 0.92, 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.91, + size.width, size.height * 0.91); + path.cubicTo(size.width, size.height, size.width * 0.94, size.height, + size.width * 0.9, size.height); + path.cubicTo(size.width * 0.9, size.height, size.width * 0.05, size.height, + size.width * 0.05, size.height); + path.cubicTo(size.width * 0.1, size.height * 0.95, size.width * 0.07, + size.height * 0.87, size.width * 0.05, size.height * 0.84); + path.cubicTo(-0.02, size.height * 0.76, size.width * 0.02, + size.height * 0.63, size.width * 0.05, size.height * 0.58); + path.cubicTo(size.width * 0.13, size.height * 0.45, size.width * 0.09, + size.height * 0.34, size.width * 0.05, size.height * 0.3); + path.cubicTo(size.width * 0.05, size.height * 0.3, size.width * 0.05, + size.height * 0.3, size.width * 0.05, size.height * 0.3); + return path; + } + + @override + bool shouldReclip(CustomClipper oldClipper) => false; +} diff --git a/pubspec.yaml b/pubspec.yaml index 9699489..0ae2aa8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -72,6 +72,7 @@ flutter: assets: - assets/images/ - assets/images/Icons/ + - assets/images/Event_Images/ - .env.local # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware