diff --git a/firka/lib/helpers/ui/firka_card.dart b/firka/lib/helpers/ui/firka_card.dart index b2583357..bdb6d881 100644 --- a/firka/lib/helpers/ui/firka_card.dart +++ b/firka/lib/helpers/ui/firka_card.dart @@ -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( diff --git a/firka/lib/main.dart b/firka/lib/main.dart index 25a0af61..a4624f4e 100644 --- a/firka/lib/main.dart +++ b/firka/lib/main.dart @@ -101,8 +101,7 @@ Future 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'), ), diff --git a/firka/lib/ui/phone/widgets/lesson_small.dart b/firka/lib/ui/phone/widgets/lesson_small.dart index f405999b..91a84e06 100644 --- a/firka/lib/ui/phone/widgets/lesson_small.dart +++ b/firka/lib/ui/phone/widgets/lesson_small.dart @@ -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)), ], ) ], diff --git a/firka/lib/ui/widget/delayed_spinner.dart b/firka/lib/ui/widget/delayed_spinner.dart index fbd1c1f4..50302f3b 100644 --- a/firka/lib/ui/widget/delayed_spinner.dart +++ b/firka/lib/ui/widget/delayed_spinner.dart @@ -16,7 +16,7 @@ class _DelayedSpinner extends State { @override void initState() { super.initState(); - + timer = Timer(Duration(milliseconds: 50), () { setState(() { showSpinner = true; diff --git a/firka/lib/ui/widget/grade_small_card.dart b/firka/lib/ui/widget/grade_small_card.dart index 736a4653..f5332fe8 100644 --- a/firka/lib/ui/widget/grade_small_card.dart +++ b/firka/lib/ui/widget/grade_small_card.dart @@ -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))), + ), + ), + ), ]); }