Skip to content

Commit

Permalink
fix: one off assignment padding (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
invertedEcho authored Nov 10, 2024
1 parent 70db5c5 commit 5eebe62
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions frontend/lib/widgets/assignments/assignments_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ class AssignmentsWidgetState extends State<AssignmentsWidget> {
? parseToDueDate(firstAssignmentDueDate)
: "";

final isRecurringAssignments = sectionAssignments.any(
(assignment) =>
assignment.taskGroupTitle != null);
final isRecurringAssignments = sectionAssignments
.any((assignment) => !assignment.isOneOff);

return Container(
margin: const EdgeInsets.symmetric(
Expand Down Expand Up @@ -193,15 +192,27 @@ class AssignmentsWidgetState extends State<AssignmentsWidget> {
color: Colors.blueAccent)))
],
),
const SizedBox(
height: generalSizedBoxHeight / 4),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 0, horizontal: 4),
child: Text(maybeParsedDueDate),
),
const SizedBox(
height: generalSizedBoxHeight / 2),
SizedBox(
height: isRecurringAssignments
? generalSizedBoxHeight / 4
: 0),
isRecurringAssignments
? Padding(
padding: EdgeInsets.symmetric(
vertical: 0,
horizontal: isRecurringAssignments
? 4
: 0),
child: Text(maybeParsedDueDate),
)
: const SizedBox(
width: 0,
height: 0,
),
SizedBox(
height: isRecurringAssignments
? generalSizedBoxHeight / 2
: 0),
ListView.builder(
shrinkWrap: true,
physics: const ClampingScrollPhysics(),
Expand Down

0 comments on commit 5eebe62

Please sign in to comment.