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/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/image01.png b/assets/images/Event_Images/image01.png new file mode 100644 index 0000000..586640b Binary files /dev/null and b/assets/images/Event_Images/image01.png differ 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/image03.jpg b/assets/images/Event_Images/image03.jpg new file mode 100644 index 0000000..0f75ed4 Binary files /dev/null and b/assets/images/Event_Images/image03.jpg differ diff --git a/assets/images/Event_Images/image04.jpg b/assets/images/Event_Images/image04.jpg new file mode 100644 index 0000000..48a98c7 Binary files /dev/null and b/assets/images/Event_Images/image04.jpg differ diff --git a/assets/images/Event_Images/image05.jpg b/assets/images/Event_Images/image05.jpg new file mode 100644 index 0000000..7e4e22a Binary files /dev/null and b/assets/images/Event_Images/image05.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/assets/images/Icons/logo_footer.png b/assets/images/Icons/logo_footer.png new file mode 100644 index 0000000..3c2985a Binary files /dev/null and b/assets/images/Icons/logo_footer.png differ diff --git a/assets/images/logo Kopie.png b/assets/images/logo Kopie.png new file mode 100644 index 0000000..b0bb09d Binary files /dev/null and b/assets/images/logo Kopie.png differ diff --git a/assets/images/logo.png b/assets/images/logo.png index b0bb09d..4b95e97 100644 Binary files a/assets/images/logo.png and b/assets/images/logo.png differ diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 8e3ca5d..15cada4 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -59,6 +59,7 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/lib/screens/subheader_Datepicker.dart b/lib/screens/subheader_Datepicker.dart index a9ea6ba..ef6c415 100644 --- a/lib/screens/subheader_Datepicker.dart +++ b/lib/screens/subheader_Datepicker.dart @@ -1,3 +1,6 @@ +import 'dart:math'; + +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'; @@ -196,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, @@ -205,6 +208,28 @@ 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/image02.jpg', + 'assets/images/Event_Images/image03.jpg', + 'assets/images/Event_Images/image04.jpg', + 'assets/images/Event_Images/image05.jpg', + ]; + 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( @@ -231,7 +256,7 @@ class EventCard2Section extends StatelessWidget { ), child: Stack( children: [ - Positioned( + /* Positioned( right: 0, top: 0, child: Image.asset( @@ -239,7 +264,20 @@ class EventCard2Section extends StatelessWidget { height: 110, // Höhe des Bildes width: 130, // Breite des Bildes ), - ), + ), */ + + Positioned( + right: 0, + top: 0, + child: ClipPath( + clipper: _getRandomClipper(), + child: Image.asset( + getRandomImage(), // Pfad zum Bild + height: 110, // Höhe des Bildes + width: 115, // Breite des Bildes + fit: BoxFit.cover, + ), + )), //Bookmark Button Positioned( // Bookmark Button @@ -275,7 +313,7 @@ class EventCard2Section extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - shortenText(title, 24), + shortenText(title, 20), style: const TextStyle( color: Color(0xFF0A0A0A), fontSize: 18, diff --git a/lib/utils/clipper.dart b/lib/utils/clipper.dart new file mode 100644 index 0000000..258f655 --- /dev/null +++ b/lib/utils/clipper.dart @@ -0,0 +1,97 @@ +import 'package:flutter/material.dart'; + +class WaveClipper 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; +} + +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/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 2635ffc..5260fbc 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -59,6 +59,7 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> 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: 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