1
0
forked from firka/firka

timetable: Fix lesson number icon

closes #49
This commit is contained in:
2025-09-08 20:30:38 +02:00
parent 932a89193e
commit 1f2b8091f1
2 changed files with 101 additions and 55 deletions

View File

@@ -0,0 +1,3 @@
<svg width="17" height="18" viewBox="0 0 17 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.6372 4.23604C15.047 1.69217 12.2211 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18C12.2211 18 15.047 16.3078 16.6372 13.764C16.2218 12.2466 16 10.6492 16 9C16 7.35081 16.2218 5.75343 16.6372 4.23604Z" fill="#000000" />
</svg>

After

Width:  |  Height:  |  Size: 384 B

View File

@@ -4,6 +4,7 @@ import 'package:firka/helpers/ui/firka_card.dart';
import 'package:firka/main.dart';
import 'package:firka/ui/model/style.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:majesticons_flutter/majesticons_flutter.dart';
import '../../../helpers/api/model/test.dart';
@@ -56,27 +57,41 @@ class LessonWidget extends StatelessWidget {
: appStyle.colors.card,
shadow: !isDismissed,
left: [
Card(
// TODO: improve this to match design
shadowColor: Colors.transparent,
color: bgColor,
child: Padding(
padding: EdgeInsets.all(4),
child: Text(lessonNo.toString(),
style: appStyle.fonts.B_12R.apply(color: secondary)),
SizedBox(
width: 18,
height: 18,
child: Stack(
children: [
SvgPicture.asset(
"assets/icons/subtract.svg",
color: bgColor,
width: 18,
height: 18,
),
Padding(
padding: EdgeInsets.only(left: 5),
child: Text(lessonNo.toString(),
style: appStyle.fonts.B_12R.apply(color: secondary)),
)
],
),
),
Card(
shadowColor: Colors.transparent,
color: bgColor,
child: Padding(
padding: EdgeInsetsGeometry.all(4),
child: ClassIconWidget(
color: accent,
size: 20,
uid: lesson.uid,
className: lesson.name,
category: lesson.subject?.name ?? '',
Transform.translate(
offset: Offset(-4, 0),
child: Card(
shadowColor: Colors.transparent,
color: bgColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16)),
child: Padding(
padding: EdgeInsetsGeometry.all(4),
child: ClassIconWidget(
color: accent,
size: 20,
uid: lesson.uid,
className: lesson.name,
category: lesson.subject?.name ?? '',
),
),
),
),
@@ -185,24 +200,38 @@ class LessonWidget extends StatelessWidget {
elements.add(FirkaCard(
left: [
Card(
shadowColor: Colors.transparent,
color: appStyle.colors.a15p,
child: Padding(
padding: EdgeInsets.all(4),
child: Text(emptyClass.lessonNumber.toString(),
style: appStyle.fonts.B_12R
.apply(color: appStyle.colors.secondary)),
SizedBox(
width: 18,
height: 18,
child: Stack(
children: [
SvgPicture.asset(
"assets/icons/subtract.svg",
color: bgColor,
width: 18,
height: 18,
),
Padding(
padding: EdgeInsets.only(left: 5),
child: Text(lessonNo.toString(),
style: appStyle.fonts.B_12R.apply(color: secondary)),
)
],
),
),
Card(
shadowColor: Colors.transparent,
color: appStyle.colors.a15p,
child: Padding(
padding: EdgeInsetsGeometry.all(4),
child: FirkaIconWidget(
FirkaIconType.majesticonsLocal, 'cupFilled',
color: appStyle.colors.accent, size: 24),
Transform.translate(
offset: Offset(-4, 0),
child: Card(
shadowColor: Colors.transparent,
color: bgColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16)),
child: Padding(
padding: EdgeInsetsGeometry.all(4),
child: FirkaIconWidget(
FirkaIconType.majesticonsLocal, 'cupFilled',
color: appStyle.colors.accent, size: 24),
),
),
),
SizedBox(width: 8),
@@ -350,28 +379,42 @@ void showLessonBottomSheet(
children: [
Row(
children: [
Card(
// TODO: improve this to match design
shadowColor: Colors.transparent,
color: bgColor,
child: Padding(
padding: EdgeInsets.all(4),
child: Text(lessonNo.toString(),
style: appStyle.fonts.B_12R
.apply(color: secondary)),
SizedBox(
width: 18,
height: 18,
child: Stack(
children: [
SvgPicture.asset(
"assets/icons/subtract.svg",
color: bgColor,
width: 18,
height: 18,
),
Padding(
padding: EdgeInsets.only(left: 5),
child: Text(lessonNo.toString(),
style: appStyle.fonts.B_12R
.apply(color: secondary)),
)
],
),
),
Card(
shadowColor: Colors.transparent,
color: bgColor,
child: Padding(
padding: EdgeInsetsGeometry.all(6),
child: ClassIconWidget(
color: accent,
size: 20,
uid: lesson.uid,
className: lesson.name,
category: lesson.subject?.name ?? '',
Transform.translate(
offset: Offset(-4, 0),
child: Card(
shadowColor: Colors.transparent,
color: bgColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16)),
child: Padding(
padding: EdgeInsetsGeometry.all(4),
child: ClassIconWidget(
color: accent,
size: 20,
uid: lesson.uid,
className: lesson.name,
category: lesson.subject?.name ?? '',
),
),
),
),