diff --git a/lib/views/course_view/components/base_card.dart b/lib/views/course_view/components/base_card.dart index fdc2d27..7ae6211 100644 --- a/lib/views/course_view/components/base_card.dart +++ b/lib/views/course_view/components/base_card.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; +import 'package:gocast_mobile/utils/theme.dart'; class BaseCard extends StatelessWidget { final String imageName; - final VoidCallback onTap; const BaseCard({ @@ -18,16 +18,17 @@ class BaseCard extends StatelessWidget { return InkWell( onTap: onTap, child: Card( - elevation: 1, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15.0), + ), + elevation: 5, color: themeData.cardTheme.color, shadowColor: themeData.shadowColor, clipBehavior: Clip.antiAlias, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, - children: [ - ...buildCardContent(), // Call to the overridable method - ], + children: buildCardContent(), ), ), ); @@ -45,7 +46,7 @@ class BaseCard extends StatelessWidget { Widget? trailing, }) { return Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.all(12.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, @@ -56,16 +57,17 @@ class BaseCard extends StatelessWidget { children: [ Text( title, - style: const TextStyle( - fontSize: 16.0, + style: TextStyle( + fontSize: 18.0, fontWeight: FontWeight.bold, + color: appTheme.cardTheme.color, ), maxLines: 2, ), const SizedBox(height: 8.0), Text( subtitle, - style: const TextStyle(fontSize: 14.0, color: Colors.grey), + style: TextStyle(fontSize: 14.0, color: Colors.grey[600]), ), ], ), @@ -104,7 +106,7 @@ class BaseCard extends StatelessWidget { fit: BoxFit.cover, errorBuilder: (context, error, stackTrace) { return Image.asset( - 'assets/images/default_image.png', + 'assets/images/course1.png', fit: BoxFit.cover, ); }, diff --git a/lib/views/course_view/components/course_card.dart b/lib/views/course_view/components/course_card.dart index 7fc0adc..539602e 100644 --- a/lib/views/course_view/components/course_card.dart +++ b/lib/views/course_view/components/course_card.dart @@ -359,7 +359,6 @@ class CourseCard extends StatelessWidget { } Color _colorPicker() { - //TODO what are all the TUM faculties? /** Colors: * Informatik - IN: blue * Mathe - MA: purple @@ -367,14 +366,10 @@ class CourseCard extends StatelessWidget { * Physik - PH * Maschinenwesen - MW * nothing/ other: gray - * - * Elektrotechnick - EL - * Management - - * Engineering + * Elektrotechnik - EL * */ if (tumID.length < 2) return Colors.grey; - switch (tumID.substring(0, 2)) { case 'IN': return Colors.blue; @@ -384,6 +379,10 @@ class CourseCard extends StatelessWidget { return Colors.green; case 'PH': return Colors.orange; + case 'MW': + return Colors.red; + case 'EL': + return Colors.black87; default: return Colors.grey; } diff --git a/lib/views/course_view/pinned_courses_view/pinned_courses_view.dart b/lib/views/course_view/pinned_courses_view/pinned_courses_view.dart index fa07763..b450c04 100644 --- a/lib/views/course_view/pinned_courses_view/pinned_courses_view.dart +++ b/lib/views/course_view/pinned_courses_view/pinned_courses_view.dart @@ -89,7 +89,7 @@ class PinnedCoursesState extends ConsumerState { final isPinned = userPinned.any((pinnedCourse) => pinnedCourse.id == course.id); return PinnedCourseCard( - imageName: 'assets/images/course2.png', + imageName: 'assets/images/course1.png', course: course, onTap: () => _handleCourseTap(course, context), isPinned: isPinned,