4 Commits
main ... dev

Author SHA1 Message Date
checkedear
5e757d9afd fix: wrong order on homepage
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-10 17:31:12 +02:00
checkedear
fff41d95d7 fix: apply title formatting for subject names 2026-09-10 09:46:56 +02:00
checkedear
93b1d78fd2 fix: display omission bar even if no lesson available 2026-09-10 09:46:56 +02:00
checkedear
717b4b27aa fix: lesson bottom sheet subject navigation 2026-09-10 09:46:56 +02:00
6 changed files with 16 additions and 8 deletions

View File

@@ -290,12 +290,6 @@ extension StringExtension on String {
return regex.hasMatch(trim());
}
String firstUpper() {
if (isEmpty) return this;
if (length == 1) this[0].toUpperCase();
return this[0].toUpperCase() + substring(1, length);
}
String shortenName([int start = 0]) {
if (length <= 16 || start >= length) {
return this;

View File

@@ -244,7 +244,7 @@ Future<void> showLessonBottomSheet(
color: appStyle.colors.buttonSecondaryFill,
),
onTap: () {
context.go('/timetable/subject', extra: lesson.subject);
context.go('/timetable/subject', extra: lesson.subject.loadAndGet()!);
},
),
]);

View File

@@ -146,6 +146,7 @@ class _HomeMainScreen extends FirkaState<HomeMainScreen> {
final todayLesson = widget.data.client!.cache
.getClassLessons()
.on(now)
.sortByStart()
.findAllSync();
for (final item in infoItems) {

View File

@@ -62,6 +62,10 @@ class OmissionBar extends StatelessWidget {
.toList();
}
if (segmentColors.isEmpty) {
segmentColors.add(stateColor(null));
}
final bar = ClipRRect(
borderRadius: BorderRadius.circular(8),
child: Row(

View File

@@ -18,6 +18,14 @@ extension IterableExtension<T> on Iterable<T> {
}
}
extension FirstUpperExtension on String {
String firstUpper() {
if (isEmpty) return this;
if (length == 1) this[0].toUpperCase();
return this[0].toUpperCase() + substring(1, length);
}
}
extension MidnightExtension on DateTime {
DateTime getMidnight() {
return subtract(

View File

@@ -1,3 +1,4 @@
import 'package:firka_common/core/extensions.dart';
import 'package:firka_common/data/models/subject_cache_model.dart';
import 'package:flutter/material.dart';
@@ -34,7 +35,7 @@ class GradeSmallCard extends StatelessWidget {
),
Expanded(
child: Text(
subject.name,
subject.name.firstUpper(),
style: appStyle.fonts.B_16SB.apply(
color: appStyle.colors.textPrimary,
),