1
0
forked from firka/firka

chore: dart format lib

This commit is contained in:
2025-07-15 08:50:48 +02:00
parent 18bcb87738
commit 6385e143dd
5 changed files with 33 additions and 32 deletions

View File

@@ -15,10 +15,7 @@ class FirkaCard extends StatelessWidget {
if (extra != null) {
return SizedBox(
width: MediaQuery
.of(context)
.size
.width,
width: MediaQuery.of(context).size.width,
child: Card(
color: appStyle.colors.card,
child: Padding(
@@ -40,10 +37,7 @@ class FirkaCard extends StatelessWidget {
);
} else {
return SizedBox(
width: MediaQuery
.of(context)
.size
.width,
width: MediaQuery.of(context).size.width,
child: Card(
color: appStyle.colors.card,
child: Padding(

View File

@@ -101,8 +101,7 @@ Future<AppInitialization> initializeApp() async {
KretaEndpoints.kretaBase = "https://$host";
KretaEndpoints.kretaIdp = KretaEndpoints.kretaBase;
KretaEndpoints.kretaLoginUrl =
"${KretaEndpoints
.kretaBase}/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fprompt%3Dlogin%26nonce%3DwylCrqT4oN6PPgQn2yQB0euKei9nJeZ6_ffJ-VpSKZU%26response_type%3Dcode%26code_challenge_method%3DS256%26scope%3Dopenid%2520email%2520offline_access%2520kreta-ellenorzo-webapi.public%2520kreta-eugyintezes-webapi.public%2520kreta-fileservice-webapi.public%2520kreta-mobile-global-webapi.public%2520kreta-dkt-webapi.public%2520kreta-ier-webapi.public%26code_challenge%3DHByZRRnPGb-Ko_wTI7ibIba1HQ6lor0ws4bcgReuYSQ%26redirect_uri%3Dhttps%253A%252F%252Fmobil.e-kreta.hu%252Fellenorzo-student%252Fprod%252Foauthredirect%26client_id%3Dkreta-ellenorzo-student-mobile-ios%26state%3Dkreta_student_mobile%26suppressed_prompt%3Dlogin";
"${KretaEndpoints.kretaBase}/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fprompt%3Dlogin%26nonce%3DwylCrqT4oN6PPgQn2yQB0euKei9nJeZ6_ffJ-VpSKZU%26response_type%3Dcode%26code_challenge_method%3DS256%26scope%3Dopenid%2520email%2520offline_access%2520kreta-ellenorzo-webapi.public%2520kreta-eugyintezes-webapi.public%2520kreta-fileservice-webapi.public%2520kreta-mobile-global-webapi.public%2520kreta-dkt-webapi.public%2520kreta-ier-webapi.public%26code_challenge%3DHByZRRnPGb-Ko_wTI7ibIba1HQ6lor0ws4bcgReuYSQ%26redirect_uri%3Dhttps%253A%252F%252Fmobil.e-kreta.hu%252Fellenorzo-student%252Fprod%252Foauthredirect%26client_id%3Dkreta-ellenorzo-student-mobile-ios%26state%3Dkreta_student_mobile%26suppressed_prompt%3Dlogin";
KretaEndpoints.tokenGrantUrl = "${KretaEndpoints.kretaBase}/connect/token";
}
@@ -251,13 +250,11 @@ class InitializationScreen extends StatelessWidget {
supportedLocales: AppLocalizations.supportedLocales,
home: screen,
routes: {
'/login': (context) =>
LoginScreen(
'/login': (context) => LoginScreen(
initData,
key: ValueKey('loginScreen'),
),
'/debug': (context) =>
DebugScreen(
'/debug': (context) => DebugScreen(
initData,
key: ValueKey('debugScreen'),
),

View File

@@ -26,7 +26,9 @@ class LessonSmallWidget extends StatelessWidget {
category: lesson.subject?.name ?? '',
),
SizedBox(width: 8),
Text(lesson.subject?.name ?? "N/A", style: appStyle.fonts.B_16SB.apply(color: appStyle.colors.textPrimary)),
Text(lesson.subject?.name ?? "N/A",
style: appStyle.fonts.B_16SB
.apply(color: appStyle.colors.textPrimary)),
],
right: [
Card(
@@ -34,10 +36,15 @@ class LessonSmallWidget extends StatelessWidget {
color: appStyle.colors.a15p,
child: Padding(
padding: EdgeInsets.all(4),
child: Text(lesson.roomName ?? '?', style: appStyle.fonts.B_12R.apply(color: appStyle.colors.secondary)),
child: Text(lesson.roomName ?? '?',
style: appStyle.fonts.B_12R
.apply(color: appStyle.colors.secondary)),
),
),
Text("${lesson.start.toLocal().format(context, FormatMode.hmm)} - ${lesson.end.toLocal().format(context, FormatMode.hmm)}", style: appStyle.fonts.B_14R.apply(color: appStyle.colors.textPrimary)),
Text(
"${lesson.start.toLocal().format(context, FormatMode.hmm)} - ${lesson.end.toLocal().format(context, FormatMode.hmm)}",
style: appStyle.fonts.B_14R
.apply(color: appStyle.colors.textPrimary)),
],
)
],

View File

@@ -16,7 +16,7 @@ class _DelayedSpinner extends State<DelayedSpinner> {
@override
void initState() {
super.initState();
timer = Timer(Duration(milliseconds: 50), () {
setState(() {
showSpinner = true;

View File

@@ -31,19 +31,22 @@ class GradeSmallCard extends FirkaCard {
),
),
], right: [
grades.getAverageBySubject(subject).isNaN ? SizedBox() :
Card(
shadowColor: Colors.transparent,
color: getGradeColor(grades.getAverageBySubject(subject))
.withAlpha(38),
child: Padding(
padding: EdgeInsets.only(left: 8, right: 8, top: 4, bottom: 4),
child: Text(
grades.getAverageBySubject(subject).toStringAsFixed(2),
style: appStyle.fonts.B_16SB.apply(
color: getGradeColor(grades.getAverageBySubject(subject))),
),
),
),
grades.getAverageBySubject(subject).isNaN
? SizedBox()
: Card(
shadowColor: Colors.transparent,
color: getGradeColor(grades.getAverageBySubject(subject))
.withAlpha(38),
child: Padding(
padding:
EdgeInsets.only(left: 8, right: 8, top: 4, bottom: 4),
child: Text(
grades.getAverageBySubject(subject).toStringAsFixed(2),
style: appStyle.fonts.B_16SB.apply(
color: getGradeColor(
grades.getAverageBySubject(subject))),
),
),
),
]);
}