From 7b0803509c57727924a946d54d926f3f9c174920 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Fri, 3 May 2024 18:37:24 +0200 Subject: [PATCH] Improve homework card for teachers and parents --- app/lib/homework/shared/homework_card.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/lib/homework/shared/homework_card.dart b/app/lib/homework/shared/homework_card.dart index a58a63b8c..0aed6fa9f 100644 --- a/app/lib/homework/shared/homework_card.dart +++ b/app/lib/homework/shared/homework_card.dart @@ -154,7 +154,6 @@ class HomeworkCard extends StatelessWidget { overflow: TextOverflow.ellipsis, maxLines: 2, ), - isThreeLine: true, subtitle: Text.rich( TextSpan(children: [ TextSpan(text: "${homework!.courseName}\n"), @@ -176,6 +175,7 @@ class HomeworkCard extends StatelessWidget { abbreviation: homework!.subjectAbbreviation, ), trailing: _getTrailingWidget(context), + mouseCursor: SystemMouseCursors.click, ), ), ); @@ -219,9 +219,14 @@ class HomeworkCard extends StatelessWidget { ); } else { return IconButton( + tooltip: homework!.withSubmissions + ? 'Abgaben anzeigen' + : '"Erledigt von" anzeigen', iconSize: 50, - icon: Chip( - label: Text( + icon: CircleAvatar( + backgroundColor: Colors.transparent, + foregroundColor: DefaultTextStyle.of(context).style.color, + child: Text( '${homework!.withSubmissions ? homework?.submitters.length ?? 0 : homework!.assignedUserArrays.completedStudentUids.length}', ), ),