diff --git a/lib/pangea/course_creation/course_language_filter.dart b/lib/pangea/course_creation/course_language_filter.dart index 059aa3cfc..408788376 100644 --- a/lib/pangea/course_creation/course_language_filter.dart +++ b/lib/pangea/course_creation/course_language_filter.dart @@ -25,7 +25,6 @@ class CourseLanguageFilter extends StatelessWidget { displayname: (v) => v.getDisplayName(context) ?? v.displayName, enableSearch: true, defaultName: L10n.of(context).targetLanguageLabel, - shortName: L10n.of(context).allLanguages, ); } } diff --git a/lib/pangea/course_creation/course_plan_filter_widget.dart b/lib/pangea/course_creation/course_plan_filter_widget.dart index a52e321a6..01b9ef57f 100644 --- a/lib/pangea/course_creation/course_plan_filter_widget.dart +++ b/lib/pangea/course_creation/course_plan_filter_widget.dart @@ -10,7 +10,6 @@ class CoursePlanFilter extends StatefulWidget { final void Function(T?) onChanged; final String defaultName; - final String? shortName; final String Function(T) displayname; final bool enableSearch; @@ -23,7 +22,6 @@ class CoursePlanFilter extends StatefulWidget { required this.defaultName, required this.displayname, this.enableSearch = false, - this.shortName, }); @override @@ -75,7 +73,7 @@ class CoursePlanFilterState extends State> { child: DropdownTextButton( text: item != null ? widget.displayname(item) - : widget.shortName ?? widget.defaultName, + : widget.defaultName, isSelected: item == widget.value, ), ), diff --git a/lib/pangea/login/pages/new_course_page.dart b/lib/pangea/login/pages/new_course_page.dart index d6a8fb6c7..d01dc3ce2 100644 --- a/lib/pangea/login/pages/new_course_page.dart +++ b/lib/pangea/login/pages/new_course_page.dart @@ -151,65 +151,69 @@ class NewCoursePageState extends State itemBuilder: (context, index) { final course = courseEntries[index].value; final courseId = courseEntries[index].key; - return InkWell( - onTap: () => context.go( - spaceId != null - ? '/rooms/spaces/$spaceId/addcourse/$courseId' - : '/${widget.route}/course/own/$courseId', - ), - borderRadius: BorderRadius.circular(12.0), - child: Container( - padding: const EdgeInsets.all(12.0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12.0), - border: Border.all( - color: theme.colorScheme.primary, - ), + return Material( + type: MaterialType.transparency, + child: InkWell( + onTap: () => context.go( + spaceId != null + ? '/rooms/spaces/$spaceId/addcourse/$courseId' + : '/${widget.route}/course/own/$courseId', ), - child: Column( - spacing: 4.0, - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - spacing: 8.0, - children: [ - ImageByUrl( - imageUrl: course.imageUrl, - width: 58.0, - borderRadius: - BorderRadius.circular(10.0), - replacement: Container( - height: 58.0, + borderRadius: BorderRadius.circular(12.0), + child: Container( + padding: const EdgeInsets.all(12.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12.0), + border: Border.all( + color: theme.colorScheme.primary, + ), + ), + child: Column( + spacing: 4.0, + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + spacing: 8.0, + children: [ + ImageByUrl( + imageUrl: course.imageUrl, width: 58.0, - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(10.0), - color: theme - .colorScheme.surfaceContainer, + borderRadius: + BorderRadius.circular(10.0), + replacement: Container( + height: 58.0, + width: 58.0, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(10.0), + color: theme.colorScheme + .surfaceContainer, + ), ), ), - ), - Flexible( - child: Text( - course.title, - style: theme.textTheme.bodyLarge, - maxLines: 2, - overflow: TextOverflow.ellipsis, + Flexible( + child: Text( + course.title, + style: theme.textTheme.bodyLarge, + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), ), - ), - ], - ), - CourseInfoChips( - courseId, - iconSize: 12.0, - fontSize: 12.0, - ), - Text( - course.description, - style: theme.textTheme.bodyMedium, - ), - ], + ], + ), + CourseInfoChips( + courseId, + iconSize: 12.0, + fontSize: 12.0, + ), + Text( + course.description, + style: theme.textTheme.bodyMedium, + ), + ], + ), ), ), ); diff --git a/lib/pangea/login/pages/public_courses_page.dart b/lib/pangea/login/pages/public_courses_page.dart index 3a63f8771..20dbeba59 100644 --- a/lib/pangea/login/pages/public_courses_page.dart +++ b/lib/pangea/login/pages/public_courses_page.dart @@ -256,90 +256,95 @@ class PublicCoursesPageState extends State { roomChunk.canonicalAlias ?? L10n.of(context).emptyChat; - return InkWell( - onTap: () => context.go( - '/${widget.route}/course/public/$courseId', - extra: roomChunk, - ), - borderRadius: BorderRadius.circular(12.0), - child: Container( - padding: const EdgeInsets.all(12.0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12.0), - border: Border.all( - color: theme.colorScheme.primary, - ), + return Material( + type: MaterialType.transparency, + child: InkWell( + onTap: () => context.go( + '/${widget.route}/course/public/$courseId', + extra: roomChunk, ), - child: Column( - spacing: 4.0, - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - spacing: 8.0, - children: [ - ImageByUrl( - imageUrl: roomChunk.avatarUrl?.toString(), - width: 58.0, - borderRadius: BorderRadius.circular(10.0), - replacement: Container( - height: 58.0, + borderRadius: BorderRadius.circular(12.0), + child: Container( + padding: const EdgeInsets.all(12.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12.0), + border: Border.all( + color: theme.colorScheme.primary, + ), + ), + child: Column( + spacing: 4.0, + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + spacing: 8.0, + children: [ + ImageByUrl( + imageUrl: + roomChunk.avatarUrl?.toString(), width: 58.0, - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(10.0), - color: theme - .colorScheme.surfaceContainer, + borderRadius: + BorderRadius.circular(10.0), + replacement: Container( + height: 58.0, + width: 58.0, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(10.0), + color: theme + .colorScheme.surfaceContainer, + ), ), ), - ), - Flexible( - child: Column( - spacing: 0.0, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - displayname, - style: theme.textTheme.bodyLarge, - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - Row( - spacing: 4.0, - mainAxisSize: MainAxisSize.min, - children: [ - const Icon( - Icons.group, - size: 16.0, - ), - Text( - L10n.of(context) - .countParticipants( - roomChunk.numJoinedMembers, + Flexible( + child: Column( + spacing: 0.0, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + displayname, + style: theme.textTheme.bodyLarge, + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + Row( + spacing: 4.0, + mainAxisSize: MainAxisSize.min, + children: [ + const Icon( + Icons.group, + size: 16.0, ), - style: - theme.textTheme.bodyMedium, - ), - ], - ), - ], + Text( + L10n.of(context) + .countParticipants( + roomChunk.numJoinedMembers, + ), + style: theme + .textTheme.bodyMedium, + ), + ], + ), + ], + ), ), + ], + ), + if (course != null) ...[ + CourseInfoChips( + courseId, + iconSize: 12.0, + fontSize: 12.0, + ), + Text( + course.description, + style: theme.textTheme.bodyMedium, ), ], - ), - if (course != null) ...[ - CourseInfoChips( - courseId, - iconSize: 12.0, - fontSize: 12.0, - ), - Text( - course.description, - style: theme.textTheme.bodyMedium, - ), ], - ], + ), ), ), );