Skip to content

Commit

Permalink
improving study progress card
Browse files Browse the repository at this point in the history
  • Loading branch information
Panosfunk committed Jan 29, 2025
1 parent 8303e0d commit 66a2059
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/ui/cards/study_progress_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ class StudyProgressCardWidgetState extends State<StudyProgressCardWidget> {
Text(
locale.translate(
widget.model.progress[index].state),
style: const TextStyle(
fontSize: 16),
style: const TextStyle(fontSize: 16),
),
],
),
Expand All @@ -81,7 +80,7 @@ class StudyProgressCardWidgetState extends State<StudyProgressCardWidget> {
),
// Circular Progress Representation
Padding(
padding: const EdgeInsets.only(right: 24.0),
padding: const EdgeInsets.only(bottom: 18, right: 24.0),
child: SizedBox(
width: 104,
height: 104,
Expand All @@ -92,7 +91,7 @@ class StudyProgressCardWidgetState extends State<StudyProgressCardWidget> {
.toList(),
colors: widget.colors,
faintColors: widget.colors
.map((c) => c.withOpacity(0.1))
.map((c) => c.withOpacity(0.2))
.toList(),
),
),
Expand Down Expand Up @@ -134,6 +133,12 @@ class TaskProgressPainter extends CustomPainter {

List<double> percentages = values.map((v) => v / totalTasks).toList();

Paint blackCircle = Paint()
..color = Colors.black
..style = PaintingStyle.fill;

canvas.drawCircle(center, maxRadius + ringWidth, blackCircle);

for (int i = 0; i < 3; i++) {
double radius = maxRadius - (i * ringWidth);
double sweepAngle = pi * percentages[i];
Expand Down

0 comments on commit 66a2059

Please sign in to comment.