From 1b95afdfc23cb907a2659fb6c1ea316b2efc9e3e Mon Sep 17 00:00:00 2001 From: zypherift Date: Sun, 28 Apr 2024 23:04:23 +0200 Subject: [PATCH 01/10] git things --- refilc/lib/theme/theme.dart | 8 ++-- refilc_mobile_ui/lib/common/filter_bar.dart | 2 +- .../common/profile_image/profile_button.dart | 2 +- .../lib/pages/absences/absences_page.dart | 2 +- .../lib/pages/grades/grade_subject_view.dart | 39 ++++--------------- .../lib/pages/grades/grades_page.dart | 2 +- .../lib/pages/home/home_page.dart | 2 +- .../lib/pages/messages/messages_page.dart | 2 +- .../lib/pages/notes/notes_page.dart | 2 +- .../lib/pages/timetable/timetable_page.dart | 2 +- .../lib/screens/navigation/navbar_item.dart | 2 +- .../settings/accounts/account_view.dart | 2 +- .../lib/screens/settings/settings_screen.dart | 2 +- 13 files changed, 21 insertions(+), 48 deletions(-) diff --git a/refilc/lib/theme/theme.dart b/refilc/lib/theme/theme.dart index 755589e..33a3953 100644 --- a/refilc/lib/theme/theme.dart +++ b/refilc/lib/theme/theme.dart @@ -83,8 +83,7 @@ class AppTheme { accentColor == AccentColor.ogfilc) || !settings.newColors ? accent - : ColorsUtils().darken(accent, - amount: 0.4); // white mode: same tertiary as secondary + : ColorsUtils().darken(accent, amount: 0.5); return ThemeData( brightness: Brightness.light, @@ -187,15 +186,14 @@ class AppTheme { accentColor == AccentColor.ogfilc) || !settings.newColors ? accent - : ColorsUtils().lighten(accent, amount: 0.3); + : ColorsUtils().lighten(accent, amount: 0.1); // Color newScaffoldBg = ColorsUtils().lighten(accent, amount: 0.4); Color newTertiary = (accentColor == AccentColor.adaptive || accentColor == AccentColor.custom || accentColor == AccentColor.ogfilc) || !settings.newColors ? accent - : ColorsUtils().darken(accent, - amount: 0.1); // dark mode: tertiary is way darker than secondary + : ColorsUtils().lighten(accent, amount: 0.4); return ThemeData( brightness: Brightness.dark, diff --git a/refilc_mobile_ui/lib/common/filter_bar.dart b/refilc_mobile_ui/lib/common/filter_bar.dart index 019b4c5..ade96a3 100644 --- a/refilc_mobile_ui/lib/common/filter_bar.dart +++ b/refilc_mobile_ui/lib/common/filter_bar.dart @@ -61,7 +61,7 @@ class _FilterBarState extends State { indicatorSize: TabBarIndicatorSize.tab, indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0), indicator: BoxDecoration( - color: Theme.of(context).colorScheme.tertiary.withOpacity(.2), + color: Theme.of(context).colorScheme.secondary.withOpacity(.2), borderRadius: BorderRadius.circular(45.0), ), overlayColor: MaterialStateProperty.all(const Color(0x00000000)), diff --git a/refilc_mobile_ui/lib/common/profile_image/profile_button.dart b/refilc_mobile_ui/lib/common/profile_image/profile_button.dart index e63eba2..a4b1f5d 100644 --- a/refilc_mobile_ui/lib/common/profile_image/profile_button.dart +++ b/refilc_mobile_ui/lib/common/profile_image/profile_button.dart @@ -58,7 +58,7 @@ class ProfileButton extends StatelessWidget { return ProfileImage( backgroundColor: !pMode ? child.backgroundColor - : Theme.of(context).colorScheme.tertiary, + : Theme.of(context).colorScheme.secondary, heroTag: child.heroTag, key: child.key, name: !pMode ? child.name : "János", diff --git a/refilc_mobile_ui/lib/pages/absences/absences_page.dart b/refilc_mobile_ui/lib/pages/absences/absences_page.dart index 6b02ce1..6f69382 100644 --- a/refilc_mobile_ui/lib/pages/absences/absences_page.dart +++ b/refilc_mobile_ui/lib/pages/absences/absences_page.dart @@ -165,7 +165,7 @@ class AbsencesPageState extends State name: firstName, backgroundColor: Theme.of(context) .colorScheme - .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart b/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart index 0bb1df2..bfa50cb 100644 --- a/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart +++ b/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart @@ -147,8 +147,8 @@ class _GradeSubjectViewState extends State ), )); - if (!gradeCalcMode) { - tiles.addAll([ + tiles.addAll( + [ const SizedBox( height: 5.0, ), @@ -162,8 +162,8 @@ class _GradeSubjectViewState extends State controller: _tabController, disableFading: true, ), - ]); - } + ], + ); if (showGraph(subjectGrades) && _tabController.index == 0) { tiles.add(gradeGraph); @@ -380,31 +380,13 @@ class _GradeSubjectViewState extends State .where((e) => e.type == GradeType.midYear) .isNotEmpty, child: ExpandableFab( - openButtonBuilder: FloatingActionButtonBuilder( - size: 20.0, - builder: (context, onPressed, progress) => - FloatingActionButton.small( - onPressed: onPressed, - backgroundColor: Theme.of(context).colorScheme.tertiary, - child: const Icon(Icons.more_horiz_outlined), - ), - ), - closeButtonBuilder: FloatingActionButtonBuilder( - size: 20.0, - builder: (context, onPressed, progress) => - FloatingActionButton.small( - onPressed: onPressed, - backgroundColor: Theme.of(context).colorScheme.tertiary, - child: const Icon(Icons.close), - ), - ), type: ExpandableFabType.up, distance: 50, - // childrenOffset: const Offset(-8.8, 0.0), + childrenOffset: const Offset(-3.8, 0.0), children: [ FloatingActionButton.small( heroTag: "btn_ghost_grades", - backgroundColor: Theme.of(context).colorScheme.tertiary, + backgroundColor: Theme.of(context).colorScheme.secondary, onPressed: () { gradeCalc(context); }, @@ -412,7 +394,7 @@ class _GradeSubjectViewState extends State ), FloatingActionButton.small( heroTag: "btn_goal_planner", - backgroundColor: Theme.of(context).colorScheme.tertiary, + backgroundColor: Theme.of(context).colorScheme.secondary, onPressed: () { // if (!Provider.of(context, listen: false) // .hasScope(PremiumScopes.goalPlanner)) { @@ -551,10 +533,6 @@ class _GradeSubjectViewState extends State elevation: 12.0, ); - // set tab - int tabIndex = _tabController.index; - _tabController.animateTo(0); - // Hide the fab and grades setState(() { gradeCalcMode = true; @@ -563,9 +541,6 @@ class _GradeSubjectViewState extends State _sheetController!.closed.then((value) { // Show fab and grades if (mounted) { - // set tab - _tabController.animateTo(tabIndex); - setState(() { gradeCalcMode = false; }); diff --git a/refilc_mobile_ui/lib/pages/grades/grades_page.dart b/refilc_mobile_ui/lib/pages/grades/grades_page.dart index 88f1030..7305bc8 100644 --- a/refilc_mobile_ui/lib/pages/grades/grades_page.dart +++ b/refilc_mobile_ui/lib/pages/grades/grades_page.dart @@ -546,7 +546,7 @@ class GradesPageState extends State { name: firstName, backgroundColor: Theme.of(context) .colorScheme - .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/pages/home/home_page.dart b/refilc_mobile_ui/lib/pages/home/home_page.dart index 3981d45..06106d0 100644 --- a/refilc_mobile_ui/lib/pages/home/home_page.dart +++ b/refilc_mobile_ui/lib/pages/home/home_page.dart @@ -307,7 +307,7 @@ class HomePageState extends State with TickerProviderStateMixin { name: firstName, backgroundColor: Theme.of(context) .colorScheme - .tertiary, //!settings.presentationMode + .secondary, //!settings.presentationMode //? ColorUtils.stringToColor(user.displayName ?? "?") //: Theme.of(context).colorScheme.secondary, badge: updateProvider.available, diff --git a/refilc_mobile_ui/lib/pages/messages/messages_page.dart b/refilc_mobile_ui/lib/pages/messages/messages_page.dart index b36ea1c..c000ca9 100644 --- a/refilc_mobile_ui/lib/pages/messages/messages_page.dart +++ b/refilc_mobile_ui/lib/pages/messages/messages_page.dart @@ -105,7 +105,7 @@ class MessagesPageState extends State name: firstName, backgroundColor: Theme.of(context) .colorScheme - .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/pages/notes/notes_page.dart b/refilc_mobile_ui/lib/pages/notes/notes_page.dart index c5ee6c5..ef814c3 100644 --- a/refilc_mobile_ui/lib/pages/notes/notes_page.dart +++ b/refilc_mobile_ui/lib/pages/notes/notes_page.dart @@ -251,7 +251,7 @@ class NotesPageState extends State with TickerProviderStateMixin { name: firstName, backgroundColor: Theme.of(context) .colorScheme - .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart b/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart index f4bb86b..470e793 100644 --- a/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart +++ b/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart @@ -283,7 +283,7 @@ class TimetablePageState extends State name: firstName, backgroundColor: Theme.of(context) .colorScheme - .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart b/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart index aed418a..3c38804 100644 --- a/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart +++ b/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart @@ -34,7 +34,7 @@ class NavbarItem extends StatelessWidget { padding: const EdgeInsets.all(12.0), decoration: BoxDecoration( color: active - ? Theme.of(context).colorScheme.tertiary.withOpacity(.2) + ? Theme.of(context).colorScheme.secondary.withOpacity(.2) : null, borderRadius: BorderRadius.circular(14.0), ), diff --git a/refilc_mobile_ui/lib/screens/settings/accounts/account_view.dart b/refilc_mobile_ui/lib/screens/settings/accounts/account_view.dart index 88057d7..bcccc37 100644 --- a/refilc_mobile_ui/lib/screens/settings/accounts/account_view.dart +++ b/refilc_mobile_ui/lib/screens/settings/accounts/account_view.dart @@ -30,7 +30,7 @@ class AccountView extends StatelessWidget { AccountTile( profileImage: ProfileImage( name: _firstName, - backgroundColor: Theme.of(context).colorScheme.tertiary, + backgroundColor: Theme.of(context).colorScheme.secondary, role: user.role, ), name: SelectableText( diff --git a/refilc_mobile_ui/lib/screens/settings/settings_screen.dart b/refilc_mobile_ui/lib/screens/settings/settings_screen.dart index 70967fb..5442824 100644 --- a/refilc_mobile_ui/lib/screens/settings/settings_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/settings_screen.dart @@ -136,7 +136,7 @@ class SettingsScreenState extends State profilePictureString: account.picture, backgroundColor: Theme.of(context) .colorScheme - .tertiary, //!settings.presentationMode + .secondary, //!settings.presentationMode //? ColorUtils.stringToColor(account.name) //: Theme.of(context).colorScheme.secondary, ), From 677303fa2cdfafd4f4fe1e8028135884dbcdbc23 Mon Sep 17 00:00:00 2001 From: zypherift Date: Sun, 28 Apr 2024 23:05:11 +0200 Subject: [PATCH 02/10] image cache, font etc --- refilc_mobile_ui/lib/screens/login/login_screen.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/refilc_mobile_ui/lib/screens/login/login_screen.dart b/refilc_mobile_ui/lib/screens/login/login_screen.dart index 5bb8b65..2ece980 100644 --- a/refilc_mobile_ui/lib/screens/login/login_screen.dart +++ b/refilc_mobile_ui/lib/screens/login/login_screen.dart @@ -78,6 +78,11 @@ class LoginScreenState extends State { @override Widget build(BuildContext context) { + precacheImage(const AssetImage('assets/images/showcase1.png'), context); + precacheImage(const AssetImage('assets/images/showcase2.png'), context); + precacheImage(const AssetImage('assets/images/showcase3.png'), context); + precacheImage(const AssetImage('assets/images/showcase4.png'), context); + return Scaffold( body: Container( decoration: const BoxDecoration(color: Color(0xFFDAE4F7)), @@ -130,7 +135,7 @@ class LoginScreenState extends State { height: MediaQuery.of(context).size.height, viewportFraction: 1, autoPlay: true, - autoPlayInterval: const Duration(seconds: 4), + autoPlayInterval: const Duration(seconds: 5), pauseAutoPlayOnTouch: true), items: [1, 2, 3, 4].map((i) { return Builder( @@ -152,7 +157,7 @@ class LoginScreenState extends State { style: TextStyle( color: AppColors.of(context) .loginPrimary, - fontSize: 20, + fontSize: 19, fontFamily: 'Montserrat', fontWeight: FontWeight.w700, height: 1.3), @@ -166,7 +171,7 @@ class LoginScreenState extends State { style: const TextStyle( fontFamily: 'FigTree', fontWeight: FontWeight.w500, - fontSize: 18, + fontSize: 17, height: 1.3), ), ), From 156466235d769c67e45bd186a7e098b41ec142a4 Mon Sep 17 00:00:00 2001 From: zypherift Date: Sun, 28 Apr 2024 23:06:11 +0200 Subject: [PATCH 03/10] increase carousel time --- refilc_mobile_ui/lib/screens/login/login_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refilc_mobile_ui/lib/screens/login/login_screen.dart b/refilc_mobile_ui/lib/screens/login/login_screen.dart index 2ece980..8f726e3 100644 --- a/refilc_mobile_ui/lib/screens/login/login_screen.dart +++ b/refilc_mobile_ui/lib/screens/login/login_screen.dart @@ -135,7 +135,7 @@ class LoginScreenState extends State { height: MediaQuery.of(context).size.height, viewportFraction: 1, autoPlay: true, - autoPlayInterval: const Duration(seconds: 5), + autoPlayInterval: const Duration(seconds: 6), pauseAutoPlayOnTouch: true), items: [1, 2, 3, 4].map((i) { return Builder( From f2be0ee6d4241117f560b21aaafe13d7e26f5fd2 Mon Sep 17 00:00:00 2001 From: zypherift Date: Sun, 28 Apr 2024 23:06:19 +0200 Subject: [PATCH 04/10] weird --- refilc_mobile_ui/lib/screens/login/login_screen.i18n.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refilc_mobile_ui/lib/screens/login/login_screen.i18n.dart b/refilc_mobile_ui/lib/screens/login/login_screen.i18n.dart index da41626..ca27bed 100644 --- a/refilc_mobile_ui/lib/screens/login/login_screen.i18n.dart +++ b/refilc_mobile_ui/lib/screens/login/login_screen.i18n.dart @@ -60,7 +60,7 @@ extension Localization on String { "welcome_title_3": "Kövesd a céljaidat, és legyen a matek egyesből matek ötös.", "welcome_text_3": - "Állítsd be a célodat, és mi megmondjuk, hányas jegyet kell szerezned. Még konfetti is van a cél elérésekor.", + "Állítsd be a célodat, és mi megmondjuk, hány jegyet kell szerezned. Még konfetti is van a cél elérésekor.", "welcome_title_4": "Füzetelj annyit, amennyit csak szeretnél.", "welcome_text_4": "A beépített jegyzetfüzetbe órák szerint is rendezheted a jegyzeteidet, így mindent megtalálsz egy appban.", From d746ebc1435014f5ba07ca2a0fff7fdc330016e9 Mon Sep 17 00:00:00 2001 From: zypherift Date: Sun, 28 Apr 2024 23:09:57 +0200 Subject: [PATCH 05/10] add flutter_portal --- refilc_mobile_ui/pubspec.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/refilc_mobile_ui/pubspec.yaml b/refilc_mobile_ui/pubspec.yaml index 7640a9a..43ffc5e 100644 --- a/refilc_mobile_ui/pubspec.yaml +++ b/refilc_mobile_ui/pubspec.yaml @@ -70,6 +70,7 @@ dependencies: xml: ^6.5.0 markdown: ^7.2.2 carousel_slider: ^4.2.1 + flutter_portal: ^1.1.4 dev_dependencies: flutter_lints: ^3.0.1 From bc61b61ae187dc26c92cb0ff3a1c6b3fe27b5736 Mon Sep 17 00:00:00 2001 From: zypherift Date: Mon, 29 Apr 2024 00:25:16 +0200 Subject: [PATCH 06/10] add dep bc flutter --- refilc/pubspec.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/refilc/pubspec.yaml b/refilc/pubspec.yaml index 8dd1a29..3b8b870 100644 --- a/refilc/pubspec.yaml +++ b/refilc/pubspec.yaml @@ -81,6 +81,7 @@ dependencies: get_it: ^7.6.7 xml: ^6.5.0 carousel_slider: ^4.2.1 + flutter_portal: ^1.1.4 dev_dependencies: flutter_lints: ^3.0.1 From 78e64089629b3501b6722c452a0a21921d16a3b0 Mon Sep 17 00:00:00 2001 From: zypherift Date: Mon, 29 Apr 2024 00:25:23 +0200 Subject: [PATCH 07/10] todo, gn --- .../lib/screens/login/login_screen.dart | 574 +++++++++--------- 1 file changed, 290 insertions(+), 284 deletions(-) diff --git a/refilc_mobile_ui/lib/screens/login/login_screen.dart b/refilc_mobile_ui/lib/screens/login/login_screen.dart index 8f726e3..8557e9b 100644 --- a/refilc_mobile_ui/lib/screens/login/login_screen.dart +++ b/refilc_mobile_ui/lib/screens/login/login_screen.dart @@ -15,6 +15,7 @@ import 'package:flutter/services.dart'; import 'login_screen.i18n.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:flutter_portal/flutter_portal.dart'; class LoginScreen extends StatefulWidget { const LoginScreen({super.key, this.back = false}); @@ -83,298 +84,303 @@ class LoginScreenState extends State { precacheImage(const AssetImage('assets/images/showcase3.png'), context); precacheImage(const AssetImage('assets/images/showcase4.png'), context); - return Scaffold( - body: Container( - decoration: const BoxDecoration(color: Color(0xFFDAE4F7)), - child: SingleChildScrollView( - physics: const ClampingScrollPhysics(), - controller: _scrollController, - child: Container( - decoration: const BoxDecoration(color: Color(0xFFDAE4F7)), - width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height, - child: SafeArea( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // app icon - Padding( - padding: const EdgeInsets.only(left: 24, top: 20), - child: Row( - children: [ - Image.asset( - 'assets/icons/ic_rounded.png', - width: 30.0, - ), - const SizedBox(width: 8), - Text( - 'reFilc', - style: TextStyle( - color: AppColors.of(context).loginPrimary, - fontSize: 18.0, - fontWeight: FontWeight.bold, - fontFamily: 'Montserrat'), - ), - Material( - type: MaterialType.transparency, - child: showBack - ? BackButton( - color: AppColors.of(context).loginPrimary) - : const SizedBox(height: 48.0), - ), - ], - )), - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - const SizedBox(height: 21), - CarouselSlider( - options: CarouselOptions( - height: MediaQuery.of(context).size.height, - viewportFraction: 1, - autoPlay: true, - autoPlayInterval: const Duration(seconds: 6), - pauseAutoPlayOnTouch: true), - items: [1, 2, 3, 4].map((i) { - return Builder( - builder: (BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(left: 24), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Text( - "welcome_title_$i".i18n, - style: TextStyle( - color: AppColors.of(context) - .loginPrimary, - fontSize: 19, - fontFamily: 'Montserrat', - fontWeight: FontWeight.w700, - height: 1.3), - ), - const SizedBox(height: 14.375), //meth - Padding( - padding: const EdgeInsets.only( - right: 20), - child: Text( - "welcome_text_$i".i18n, - style: const TextStyle( - fontFamily: 'FigTree', - fontWeight: FontWeight.w500, - fontSize: 17, + return Portal( + child: Scaffold( + body: Container( + decoration: const BoxDecoration(color: Color(0xFFDAE4F7)), + child: SingleChildScrollView( + physics: const ClampingScrollPhysics(), + controller: _scrollController, + child: Container( + decoration: const BoxDecoration(color: Color(0xFFDAE4F7)), + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, + child: SafeArea( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // app icon + Padding( + padding: const EdgeInsets.only(left: 24, top: 20), + child: Row( + children: [ + Image.asset( + 'assets/icons/ic_rounded.png', + width: 30.0, + ), + const SizedBox(width: 8), + Text( + 'reFilc', + style: TextStyle( + color: AppColors.of(context).loginPrimary, + fontSize: 18.0, + fontWeight: FontWeight.bold, + fontFamily: 'Montserrat'), + ), + Material( + type: MaterialType.transparency, + child: showBack + ? BackButton( + color: AppColors.of(context).loginPrimary) + : const SizedBox(height: 48.0), + ), + ], + )), + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const SizedBox(height: 21), + CarouselSlider( + options: CarouselOptions( + height: MediaQuery.of(context).size.height, + viewportFraction: 1, + autoPlay: true, + autoPlayInterval: const Duration(seconds: 6), + pauseAutoPlayOnTouch: true), + items: [1, 2, 3, 4].map((i) { + return Builder( + builder: (BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: + const EdgeInsets.only(left: 24), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Text( + "welcome_title_$i".i18n, + style: TextStyle( + color: AppColors.of(context) + .loginPrimary, + fontSize: 19, + fontFamily: 'Montserrat', + fontWeight: FontWeight.w700, height: 1.3), ), - ), - ], - )), - const SizedBox(height: 15.625), - Padding( - padding: const EdgeInsets.only( - left: 16, right: 16), - child: Image.asset( - 'assets/images/showcase$i.png', fit: BoxFit.fitWidth)), - ], - ); - }, - ); - }).toList(), - ), - ], - ) + const SizedBox( + height: 14.375), //meth + Padding( + padding: const EdgeInsets.only( + right: 20), + child: Text( + "welcome_text_$i".i18n, + style: const TextStyle( + fontFamily: 'FigTree', + fontWeight: FontWeight.w500, + fontSize: 17, + height: 1.3), + ), + ), + ], + )), + const SizedBox(height: 15.625), + Padding( + padding: const EdgeInsets.only( + left: 16, right: 16), + child: Image.asset( + 'assets/images/showcase$i.png', + fit: BoxFit.fitWidth)), + ], + ); + }, + ); + }).toList(), + ), + ], + ) + //TODO: finish this fucking thing:) + // // inputs + // Padding( + // padding: const EdgeInsets.only( + // left: 22.0, + // right: 22.0, + // top: 0.0, + // ), + // child: AutofillGroup( + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // // username + // Padding( + // padding: const EdgeInsets.only(bottom: 6.0), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Expanded( + // child: Text( + // "username".i18n, + // maxLines: 1, + // style: TextStyle( + // color: AppColors.of(context).loginPrimary, + // fontWeight: FontWeight.w500, + // fontSize: 12.0, + // ), + // ), + // ), + // Expanded( + // child: Text( + // "usernameHint".i18n, + // maxLines: 1, + // textAlign: TextAlign.right, + // style: TextStyle( + // color: + // AppColors.of(context).loginSecondary, + // fontWeight: FontWeight.w500, + // fontSize: 12.0, + // ), + // ), + // ), + // ], + // ), + // ), + // Padding( + // padding: const EdgeInsets.only(bottom: 12.0), + // child: LoginInput( + // style: LoginInputStyle.username, + // controller: usernameController, + // ), + // ), - // // inputs - // Padding( - // padding: const EdgeInsets.only( - // left: 22.0, - // right: 22.0, - // top: 0.0, - // ), - // child: AutofillGroup( - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // // username - // Padding( - // padding: const EdgeInsets.only(bottom: 6.0), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Expanded( - // child: Text( - // "username".i18n, - // maxLines: 1, - // style: TextStyle( - // color: AppColors.of(context).loginPrimary, - // fontWeight: FontWeight.w500, - // fontSize: 12.0, - // ), - // ), - // ), - // Expanded( - // child: Text( - // "usernameHint".i18n, - // maxLines: 1, - // textAlign: TextAlign.right, - // style: TextStyle( - // color: - // AppColors.of(context).loginSecondary, - // fontWeight: FontWeight.w500, - // fontSize: 12.0, - // ), - // ), - // ), - // ], - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(bottom: 12.0), - // child: LoginInput( - // style: LoginInputStyle.username, - // controller: usernameController, - // ), - // ), + // // password + // Padding( + // padding: const EdgeInsets.only(bottom: 6.0), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Expanded( + // child: Text( + // "password".i18n, + // maxLines: 1, + // style: TextStyle( + // color: AppColors.of(context).loginPrimary, + // fontWeight: FontWeight.w500, + // fontSize: 12.0, + // ), + // ), + // ), + // Expanded( + // child: Text( + // "passwordHint".i18n, + // maxLines: 1, + // textAlign: TextAlign.right, + // style: TextStyle( + // color: + // AppColors.of(context).loginSecondary, + // fontWeight: FontWeight.w500, + // fontSize: 12.0, + // ), + // ), + // ), + // ], + // ), + // ), + // Padding( + // padding: const EdgeInsets.only(bottom: 12.0), + // child: LoginInput( + // style: LoginInputStyle.password, + // controller: passwordController, + // ), + // ), - // // password - // Padding( - // padding: const EdgeInsets.only(bottom: 6.0), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Expanded( - // child: Text( - // "password".i18n, - // maxLines: 1, - // style: TextStyle( - // color: AppColors.of(context).loginPrimary, - // fontWeight: FontWeight.w500, - // fontSize: 12.0, - // ), - // ), - // ), - // Expanded( - // child: Text( - // "passwordHint".i18n, - // maxLines: 1, - // textAlign: TextAlign.right, - // style: TextStyle( - // color: - // AppColors.of(context).loginSecondary, - // fontWeight: FontWeight.w500, - // fontSize: 12.0, - // ), - // ), - // ), - // ], - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(bottom: 12.0), - // child: LoginInput( - // style: LoginInputStyle.password, - // controller: passwordController, - // ), - // ), + // // school + // Padding( + // padding: const EdgeInsets.only(bottom: 6.0), + // child: Text( + // "school".i18n, + // maxLines: 1, + // style: TextStyle( + // color: AppColors.of(context).loginPrimary, + // fontWeight: FontWeight.w500, + // fontSize: 12.0, + // ), + // ), + // ), + // SchoolInput( + // scroll: _scrollController, + // controller: schoolController, + // ), + // ], + // ), + // ), + // ), - // // school - // Padding( - // padding: const EdgeInsets.only(bottom: 6.0), - // child: Text( - // "school".i18n, - // maxLines: 1, - // style: TextStyle( - // color: AppColors.of(context).loginPrimary, - // fontWeight: FontWeight.w500, - // fontSize: 12.0, - // ), - // ), - // ), - // SchoolInput( - // scroll: _scrollController, - // controller: schoolController, - // ), - // ], - // ), - // ), - // ), + // // login button + // Padding( + // padding: const EdgeInsets.only( + // top: 35.0, + // left: 22.0, + // right: 22.0, + // ), + // child: Visibility( + // visible: _loginState != LoginState.inProgress, + // replacement: const Padding( + // padding: EdgeInsets.symmetric(vertical: 6.0), + // child: CircularProgressIndicator( + // valueColor: + // AlwaysStoppedAnimation(Colors.white), + // ), + // ), + // child: LoginButton( + // child: Text("login".i18n, + // maxLines: 1, + // style: const TextStyle( + // fontWeight: FontWeight.bold, + // fontSize: 20.0, + // )), + // onPressed: () => _loginAPI(context: context), + // ), + // ), + // ), - // // login button - // Padding( - // padding: const EdgeInsets.only( - // top: 35.0, - // left: 22.0, - // right: 22.0, - // ), - // child: Visibility( - // visible: _loginState != LoginState.inProgress, - // replacement: const Padding( - // padding: EdgeInsets.symmetric(vertical: 6.0), - // child: CircularProgressIndicator( - // valueColor: - // AlwaysStoppedAnimation(Colors.white), - // ), - // ), - // child: LoginButton( - // child: Text("login".i18n, - // maxLines: 1, - // style: const TextStyle( - // fontWeight: FontWeight.bold, - // fontSize: 20.0, - // )), - // onPressed: () => _loginAPI(context: context), - // ), - // ), - // ), + // // error messages + // if (_loginState == LoginState.missingFields || + // _loginState == LoginState.invalidGrant || + // _loginState == LoginState.failed) + // Padding( + // padding: const EdgeInsets.only( + // top: 8.0, left: 12.0, right: 12.0), + // child: Text( + // [ + // "missing_fields", + // "invalid_grant", + // "error" + // ][_loginState.index] + // .i18n, + // style: const TextStyle( + // color: Colors.red, + // fontWeight: FontWeight.w500, + // ), + // textAlign: TextAlign.center, + // ), + // ), + // const SizedBox(height: 22.0), - // // error messages - // if (_loginState == LoginState.missingFields || - // _loginState == LoginState.invalidGrant || - // _loginState == LoginState.failed) - // Padding( - // padding: const EdgeInsets.only( - // top: 8.0, left: 12.0, right: 12.0), - // child: Text( - // [ - // "missing_fields", - // "invalid_grant", - // "error" - // ][_loginState.index] - // .i18n, - // style: const TextStyle( - // color: Colors.red, - // fontWeight: FontWeight.w500, - // ), - // textAlign: TextAlign.center, - // ), - // ), - // const SizedBox(height: 22.0), + // // privacy policy + // GestureDetector( + // onTap: () => PrivacyView.show(context), + // child: Text( + // 'privacy'.i18n, + // style: TextStyle( + // color: AppColors.of(context).loginSecondary, + // fontWeight: FontWeight.w500, + // fontSize: 14.0, + // ), + // ), + // ), - // // privacy policy - // GestureDetector( - // onTap: () => PrivacyView.show(context), - // child: Text( - // 'privacy'.i18n, - // style: TextStyle( - // color: AppColors.of(context).loginSecondary, - // fontWeight: FontWeight.w500, - // fontSize: 14.0, - // ), - // ), - // ), - - // const Spacer( - // flex: 1, - // ), - ], + // const Spacer( + // flex: 1, + // ), + ], + ), ), ), ), From 8115d89bf52f0fe941e5c811497358ed18a17d15 Mon Sep 17 00:00:00 2001 From: zypherift Date: Mon, 29 Apr 2024 20:57:48 +0200 Subject: [PATCH 08/10] remove tudu --- refilc_mobile_ui/lib/screens/login/login_screen.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/refilc_mobile_ui/lib/screens/login/login_screen.dart b/refilc_mobile_ui/lib/screens/login/login_screen.dart index 8557e9b..1a8afdb 100644 --- a/refilc_mobile_ui/lib/screens/login/login_screen.dart +++ b/refilc_mobile_ui/lib/screens/login/login_screen.dart @@ -196,7 +196,6 @@ class LoginScreenState extends State { ), ], ) - //TODO: finish this fucking thing:) // // inputs // Padding( // padding: const EdgeInsets.only( From ee0c2d708c2bd552d2cb86521df7013f1ae92a93 Mon Sep 17 00:00:00 2001 From: zypherift Date: Mon, 29 Apr 2024 21:05:05 +0200 Subject: [PATCH 09/10] fix colors on showcase text --- refilc_mobile_ui/lib/screens/login/login_screen.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/refilc_mobile_ui/lib/screens/login/login_screen.dart b/refilc_mobile_ui/lib/screens/login/login_screen.dart index 1a8afdb..aae954b 100644 --- a/refilc_mobile_ui/lib/screens/login/login_screen.dart +++ b/refilc_mobile_ui/lib/screens/login/login_screen.dart @@ -157,9 +157,8 @@ class LoginScreenState extends State { children: [ Text( "welcome_title_$i".i18n, - style: TextStyle( - color: AppColors.of(context) - .loginPrimary, + style: const TextStyle( + color: Color(0xFF050B15), fontSize: 19, fontFamily: 'Montserrat', fontWeight: FontWeight.w700, @@ -173,6 +172,7 @@ class LoginScreenState extends State { child: Text( "welcome_text_$i".i18n, style: const TextStyle( + color: Color(0xFF050B15), fontFamily: 'FigTree', fontWeight: FontWeight.w500, fontSize: 17, From 3cbfee7220449c1f6b5409d21e30afe35c3bdf73 Mon Sep 17 00:00:00 2001 From: zypherift Date: Mon, 29 Apr 2024 21:05:42 +0200 Subject: [PATCH 10/10] fix also here --- refilc_mobile_ui/lib/screens/login/login_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refilc_mobile_ui/lib/screens/login/login_screen.dart b/refilc_mobile_ui/lib/screens/login/login_screen.dart index aae954b..21ccb80 100644 --- a/refilc_mobile_ui/lib/screens/login/login_screen.dart +++ b/refilc_mobile_ui/lib/screens/login/login_screen.dart @@ -110,10 +110,10 @@ class LoginScreenState extends State { width: 30.0, ), const SizedBox(width: 8), - Text( + const Text( 'reFilc', style: TextStyle( - color: AppColors.of(context).loginPrimary, + color: Color(0xFF050B15), fontSize: 18.0, fontWeight: FontWeight.bold, fontFamily: 'Montserrat'),