diff --git a/refilc/assets/icons/ic_android.png b/refilc/assets/icons/ic_android.png index be48f35..b795bee 100644 Binary files a/refilc/assets/icons/ic_android.png and b/refilc/assets/icons/ic_android.png differ diff --git a/refilc/assets/icons/ic_android_n.png b/refilc/assets/icons/ic_android_n.png index be48f35..b795bee 100644 Binary files a/refilc/assets/icons/ic_android_n.png and b/refilc/assets/icons/ic_android_n.png differ diff --git a/refilc/assets/icons/ic_launcher.png b/refilc/assets/icons/ic_launcher.png index 154065b..29ea3ca 100644 Binary files a/refilc/assets/icons/ic_launcher.png and b/refilc/assets/icons/ic_launcher.png differ diff --git a/refilc/assets/icons/ic_launcher_foreground.png b/refilc/assets/icons/ic_launcher_foreground.png index cd727d3..08e5963 100644 Binary files a/refilc/assets/icons/ic_launcher_foreground.png and b/refilc/assets/icons/ic_launcher_foreground.png differ diff --git a/refilc/assets/icons/ic_launcher_foreground_old.png b/refilc/assets/icons/ic_launcher_foreground_old.png index a6d9eab..4d92044 100644 Binary files a/refilc/assets/icons/ic_launcher_foreground_old.png and b/refilc/assets/icons/ic_launcher_foreground_old.png differ diff --git a/refilc/assets/icons/ic_launcher_monochrome.png b/refilc/assets/icons/ic_launcher_monochrome.png index 29efac3..fcf2f0f 100644 Binary files a/refilc/assets/icons/ic_launcher_monochrome.png and b/refilc/assets/icons/ic_launcher_monochrome.png differ diff --git a/refilc/assets/icons/ic_rounded.png b/refilc/assets/icons/ic_rounded.png index a40f2b4..48fa046 100644 Binary files a/refilc/assets/icons/ic_rounded.png and b/refilc/assets/icons/ic_rounded.png differ diff --git a/refilc/assets/icons/ic_splash.png b/refilc/assets/icons/ic_splash.png index cd727d3..08e5963 100644 Binary files a/refilc/assets/icons/ic_splash.png and b/refilc/assets/icons/ic_splash.png differ diff --git a/refilc/assets/images/banner_texture.png b/refilc/assets/images/banner_texture.png index 0c069a0..b00d779 100644 Binary files a/refilc/assets/images/banner_texture.png and b/refilc/assets/images/banner_texture.png differ diff --git a/refilc/assets/images/btn_plus_gold.png b/refilc/assets/images/btn_plus_gold.png index ba6d8ef..6491936 100644 Binary files a/refilc/assets/images/btn_plus_gold.png and b/refilc/assets/images/btn_plus_gold.png differ diff --git a/refilc/assets/images/btn_plus_standard.png b/refilc/assets/images/btn_plus_standard.png index 61c0429..7d747d7 100644 Binary files a/refilc/assets/images/btn_plus_standard.png and b/refilc/assets/images/btn_plus_standard.png differ diff --git a/refilc/assets/images/card_border.png b/refilc/assets/images/card_border.png index 5df72be..ecd5a23 100644 Binary files a/refilc/assets/images/card_border.png and b/refilc/assets/images/card_border.png differ diff --git a/refilc/assets/images/ext_logo/apple.png b/refilc/assets/images/ext_logo/apple.png index 7c5fd14..f08943f 100644 Binary files a/refilc/assets/images/ext_logo/apple.png and b/refilc/assets/images/ext_logo/apple.png differ diff --git a/refilc/assets/images/ext_logo/google.png b/refilc/assets/images/ext_logo/google.png index a4a9918..a9fdd46 100644 Binary files a/refilc/assets/images/ext_logo/google.png and b/refilc/assets/images/ext_logo/google.png differ diff --git a/refilc/assets/images/heart.png b/refilc/assets/images/heart.png deleted file mode 100644 index a219089..0000000 Binary files a/refilc/assets/images/heart.png and /dev/null differ diff --git a/refilc/assets/images/logo.png b/refilc/assets/images/logo.png deleted file mode 100644 index 20b717e..0000000 Binary files a/refilc/assets/images/logo.png and /dev/null differ diff --git a/refilc/assets/images/plus_gold.png b/refilc/assets/images/plus_gold.png index b9ad7ee..7a7aee9 100644 Binary files a/refilc/assets/images/plus_gold.png and b/refilc/assets/images/plus_gold.png differ diff --git a/refilc/assets/images/plus_standard.png b/refilc/assets/images/plus_standard.png index 6e796b0..6a49a30 100644 Binary files a/refilc/assets/images/plus_standard.png and b/refilc/assets/images/plus_standard.png differ diff --git a/refilc/assets/images/plus_tier_cap.png b/refilc/assets/images/plus_tier_cap.png index c476908..a79bd19 100644 Binary files a/refilc/assets/images/plus_tier_cap.png and b/refilc/assets/images/plus_tier_cap.png differ diff --git a/refilc/assets/images/plus_tier_ink.png b/refilc/assets/images/plus_tier_ink.png index 5d47d07..6c9acf8 100644 Binary files a/refilc/assets/images/plus_tier_ink.png and b/refilc/assets/images/plus_tier_ink.png differ diff --git a/refilc/assets/images/plus_tier_sponge.png b/refilc/assets/images/plus_tier_sponge.png index 4920897..aaeac4d 100644 Binary files a/refilc/assets/images/plus_tier_sponge.png and b/refilc/assets/images/plus_tier_sponge.png differ diff --git a/refilc/assets/images/premium_top_banner.png b/refilc/assets/images/premium_top_banner.png index c9506c4..3c0e7d8 100644 Binary files a/refilc/assets/images/premium_top_banner.png and b/refilc/assets/images/premium_top_banner.png differ diff --git a/refilc/assets/images/static_confetti.png b/refilc/assets/images/static_confetti.png index a9450ed..fda0d6a 100644 Binary files a/refilc/assets/images/static_confetti.png and b/refilc/assets/images/static_confetti.png differ diff --git a/refilc/assets/images/subject_covers/math_light.png b/refilc/assets/images/subject_covers/math_light.png index eb3e2f5..da401cc 100644 Binary files a/refilc/assets/images/subject_covers/math_light.png and b/refilc/assets/images/subject_covers/math_light.png differ diff --git a/refilc/assets/launch_icons/refilc_concept.png b/refilc/assets/launch_icons/refilc_concept.png index bc031ab..22e44df 100644 Binary files a/refilc/assets/launch_icons/refilc_concept.png and b/refilc/assets/launch_icons/refilc_concept.png differ diff --git a/refilc/assets/launch_icons/refilc_default.png b/refilc/assets/launch_icons/refilc_default.png index ab54f58..2d7f342 100644 Binary files a/refilc/assets/launch_icons/refilc_default.png and b/refilc/assets/launch_icons/refilc_default.png differ diff --git a/refilc/assets/launch_icons/refilc_overcomplicated.png b/refilc/assets/launch_icons/refilc_overcomplicated.png index de1f125..568ce84 100644 Binary files a/refilc/assets/launch_icons/refilc_overcomplicated.png and b/refilc/assets/launch_icons/refilc_overcomplicated.png differ diff --git a/refilc/assets/launch_icons/refilc_pride.png b/refilc/assets/launch_icons/refilc_pride.png index 2b1a305..427f6c6 100644 Binary files a/refilc/assets/launch_icons/refilc_pride.png and b/refilc/assets/launch_icons/refilc_pride.png differ diff --git a/refilc/lib/theme/theme.dart b/refilc/lib/theme/theme.dart index 755589e..1acae12 100644 --- a/refilc/lib/theme/theme.dart +++ b/refilc/lib/theme/theme.dart @@ -187,7 +187,7 @@ class AppTheme { accentColor == AccentColor.ogfilc) || !settings.newColors ? accent - : ColorsUtils().lighten(accent, amount: 0.3); + : ColorsUtils().lighten(accent, amount: 0.22); // Color newScaffoldBg = ColorsUtils().lighten(accent, amount: 0.4); Color newTertiary = (accentColor == AccentColor.adaptive || accentColor == AccentColor.custom || diff --git a/refilc/lib/ui/widgets/lesson/lesson_tile.dart b/refilc/lib/ui/widgets/lesson/lesson_tile.dart index 272d480..f2041da 100644 --- a/refilc/lib/ui/widgets/lesson/lesson_tile.dart +++ b/refilc/lib/ui/widgets/lesson/lesson_tile.dart @@ -27,6 +27,7 @@ class LessonTile extends StatelessWidget { this.currentLessonIndicator = true, this.padding, this.contentPadding, + this.showSubTiles = true, }); final Lesson lesson; @@ -37,6 +38,7 @@ class LessonTile extends StatelessWidget { final bool currentLessonIndicator; final EdgeInsetsGeometry? padding; final EdgeInsetsGeometry? contentPadding; + final bool showSubTiles; @override Widget build(BuildContext context) { @@ -149,7 +151,8 @@ class LessonTile extends StatelessWidget { child: PanelTitle(title: Text(lesson.name)), ), child: Padding( - padding: EdgeInsets.only(bottom: subtiles.isEmpty ? 0.0 : 12.0), + padding: EdgeInsets.only( + bottom: (subtiles.isNotEmpty && showSubTiles) ? 12.0 : 0.0), child: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -243,7 +246,7 @@ class LessonTile extends StatelessWidget { ? accent.withOpacity(.15) : Theme.of(context) .colorScheme - .secondary + .tertiary .withOpacity(.15), borderRadius: BorderRadius.circular(10.0), ), @@ -395,7 +398,7 @@ class LessonTile extends StatelessWidget { ? accent.withOpacity(.15) : Theme.of(context) .colorScheme - .secondary + .tertiary .withOpacity(.15), borderRadius: BorderRadius.circular(10.0), ), @@ -446,7 +449,7 @@ class LessonTile extends StatelessWidget { ), // Homework & Exams - ...subtiles, + if (showSubTiles) ...subtiles, ], ), ), diff --git a/refilc/pubspec.yaml b/refilc/pubspec.yaml index 3b8b870..39cc8c6 100644 --- a/refilc/pubspec.yaml +++ b/refilc/pubspec.yaml @@ -3,7 +3,7 @@ description: "Egy nem hivatalos e-KRÉTA kliens, diákoktól diákoknak." homepage: https://refilc.hu publish_to: "none" -version: 5.0.0+252 +version: 5.0.0+253 environment: sdk: ">=2.17.0 <=3.3.2" diff --git a/refilc_mobile_ui/lib/common/widgets/lesson/lesson_viewable.dart b/refilc_mobile_ui/lib/common/widgets/lesson/lesson_viewable.dart index a30dd2b..1cca668 100644 --- a/refilc_mobile_ui/lib/common/widgets/lesson/lesson_viewable.dart +++ b/refilc_mobile_ui/lib/common/widgets/lesson/lesson_viewable.dart @@ -1,9 +1,15 @@ import 'package:flutter_feather_icons/flutter_feather_icons.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:provider/provider.dart'; import 'package:refilc/api/providers/database_provider.dart'; import 'package:refilc/api/providers/user_provider.dart'; +import 'package:refilc/helpers/subject.dart'; +import 'package:refilc/theme/colors/colors.dart'; +import 'package:refilc/theme/colors/utils.dart'; import 'package:refilc_kreta_api/models/lesson.dart'; +import 'package:refilc_mobile_ui/common/bottom_sheet_menu/rounded_bottom_sheet.dart'; import 'package:refilc_mobile_ui/common/panel/panel_button.dart'; +import 'package:refilc_mobile_ui/common/round_border_icon.dart'; import 'package:refilc_mobile_ui/common/viewable.dart'; import 'package:refilc_mobile_ui/common/widgets/card_handle.dart'; import 'package:refilc/ui/widgets/lesson/lesson_tile.dart'; @@ -49,158 +55,164 @@ class LessonViewableState extends State { if (lsn.subject.id == '' || tile.lesson.isEmpty) return tile; - return Viewable( - tile: tile, - view: CardHandle(child: LessonView(lsn)), - actions: [ - PanelButton( - background: true, - title: Text( - "edit_lesson".i18n, - textAlign: TextAlign.center, - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - onPressed: () { - Navigator.of(context, rootNavigator: true).pop(); - - if (!Provider.of(context, listen: false) - .hasScope(PremiumScopes.timetableNotes)) { - PlusLockedFeaturePopup.show( - context: context, feature: PremiumFeature.timetableNotes); - - return; - } - - showDialog( - context: context, - builder: (context) => StatefulBuilder(builder: (context, setS) { - return AlertDialog( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(14.0))), - title: Text("edit_lesson".i18n), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - // description - TextField( - controller: _descTxt, - decoration: InputDecoration( - border: OutlineInputBorder( - borderSide: const BorderSide( - color: Colors.grey, width: 1.5), - borderRadius: BorderRadius.circular(12.0), - ), - focusedBorder: OutlineInputBorder( - borderSide: const BorderSide( - color: Colors.grey, width: 1.5), - borderRadius: BorderRadius.circular(12.0), - ), - contentPadding: - const EdgeInsets.symmetric(horizontal: 12.0), - hintText: 'l_desc'.i18n, - suffixIcon: IconButton( - icon: const Icon( - FeatherIcons.x, - color: Colors.grey, - size: 18.0, - ), - onPressed: () { - setState(() { - _descTxt.text = ''; - }); - }, - ), - ), - ), - // const SizedBox( - // height: 14.0, - // ), - // // class - // TextField( - // controller: _descTxt, - // onEditingComplete: () async { - // // SharedTheme? theme = await shareProvider.getThemeById( - // // context, - // // id: _paintId.text.replaceAll(' ', ''), - // // ); - - // // if (theme != null) { - // // // set theme variable - // // newThemeByID = theme; - - // // _paintId.clear(); - // // } else { - // // ScaffoldMessenger.of(context).showSnackBar( - // // CustomSnackBar( - // // content: Text("theme_not_found".i18n, - // // style: const TextStyle(color: Colors.white)), - // // backgroundColor: AppColors.of(context).red, - // // context: context, - // // ), - // // ); - // // } - // }, - // decoration: InputDecoration( - // border: OutlineInputBorder( - // borderSide: const BorderSide( - // color: Colors.grey, width: 1.5), - // borderRadius: BorderRadius.circular(12.0), - // ), - // focusedBorder: OutlineInputBorder( - // borderSide: const BorderSide( - // color: Colors.grey, width: 1.5), - // borderRadius: BorderRadius.circular(12.0), - // ), - // contentPadding: - // const EdgeInsets.symmetric(horizontal: 12.0), - // hintText: 'l_desc'.i18n, - // suffixIcon: IconButton( - // icon: const Icon( - // FeatherIcons.x, - // color: Colors.grey, - // size: 18.0, - // ), - // onPressed: () { - // setState(() { - // _descTxt.text = ''; - // }); - // }, - // ), - // ), - // ), - ], - ), - actions: [ - TextButton( - child: Text( - "cancel".i18n, - style: const TextStyle(fontWeight: FontWeight.w500), - ), - onPressed: () { - Navigator.of(context).maybePop(); - }, - ), - TextButton( - child: Text( - "done".i18n, - style: const TextStyle(fontWeight: FontWeight.w500), - ), - onPressed: () async { - saveLesson(); - - Navigator.of(context).pop(); - setState(() {}); - }, - ), - ], - ); - }), - ); - }, - ), - ], + return LessonTile( + lsn, + swapDesc: widget.swapDesc, + onTap: () => TimetableLessonPopup.show(context: context, lesson: lsn), ); + + // return Viewable( + // tile: tile, + // view: CardHandle(child: LessonView(lsn)), + // actions: [ + // PanelButton( + // background: true, + // title: Text( + // "edit_lesson".i18n, + // textAlign: TextAlign.center, + // maxLines: 2, + // overflow: TextOverflow.ellipsis, + // ), + // onPressed: () { + // Navigator.of(context, rootNavigator: true).pop(); + + // if (!Provider.of(context, listen: false) + // .hasScope(PremiumScopes.timetableNotes)) { + // PlusLockedFeaturePopup.show( + // context: context, feature: PremiumFeature.timetableNotes); + + // return; + // } + + // showDialog( + // context: context, + // builder: (context) => StatefulBuilder(builder: (context, setS) { + // return AlertDialog( + // shape: const RoundedRectangleBorder( + // borderRadius: BorderRadius.all(Radius.circular(14.0))), + // title: Text("edit_lesson".i18n), + // content: Column( + // mainAxisSize: MainAxisSize.min, + // children: [ + // // description + // TextField( + // controller: _descTxt, + // decoration: InputDecoration( + // border: OutlineInputBorder( + // borderSide: const BorderSide( + // color: Colors.grey, width: 1.5), + // borderRadius: BorderRadius.circular(12.0), + // ), + // focusedBorder: OutlineInputBorder( + // borderSide: const BorderSide( + // color: Colors.grey, width: 1.5), + // borderRadius: BorderRadius.circular(12.0), + // ), + // contentPadding: + // const EdgeInsets.symmetric(horizontal: 12.0), + // hintText: 'l_desc'.i18n, + // suffixIcon: IconButton( + // icon: const Icon( + // FeatherIcons.x, + // color: Colors.grey, + // size: 18.0, + // ), + // onPressed: () { + // setState(() { + // _descTxt.text = ''; + // }); + // }, + // ), + // ), + // ), + // // const SizedBox( + // // height: 14.0, + // // ), + // // // class + // // TextField( + // // controller: _descTxt, + // // onEditingComplete: () async { + // // // SharedTheme? theme = await shareProvider.getThemeById( + // // // context, + // // // id: _paintId.text.replaceAll(' ', ''), + // // // ); + + // // // if (theme != null) { + // // // // set theme variable + // // // newThemeByID = theme; + + // // // _paintId.clear(); + // // // } else { + // // // ScaffoldMessenger.of(context).showSnackBar( + // // // CustomSnackBar( + // // // content: Text("theme_not_found".i18n, + // // // style: const TextStyle(color: Colors.white)), + // // // backgroundColor: AppColors.of(context).red, + // // // context: context, + // // // ), + // // // ); + // // // } + // // }, + // // decoration: InputDecoration( + // // border: OutlineInputBorder( + // // borderSide: const BorderSide( + // // color: Colors.grey, width: 1.5), + // // borderRadius: BorderRadius.circular(12.0), + // // ), + // // focusedBorder: OutlineInputBorder( + // // borderSide: const BorderSide( + // // color: Colors.grey, width: 1.5), + // // borderRadius: BorderRadius.circular(12.0), + // // ), + // // contentPadding: + // // const EdgeInsets.symmetric(horizontal: 12.0), + // // hintText: 'l_desc'.i18n, + // // suffixIcon: IconButton( + // // icon: const Icon( + // // FeatherIcons.x, + // // color: Colors.grey, + // // size: 18.0, + // // ), + // // onPressed: () { + // // setState(() { + // // _descTxt.text = ''; + // // }); + // // }, + // // ), + // // ), + // // ), + // ], + // ), + // actions: [ + // TextButton( + // child: Text( + // "cancel".i18n, + // style: const TextStyle(fontWeight: FontWeight.w500), + // ), + // onPressed: () { + // Navigator.of(context).maybePop(); + // }, + // ), + // TextButton( + // child: Text( + // "done".i18n, + // style: const TextStyle(fontWeight: FontWeight.w500), + // ), + // onPressed: () async { + // saveLesson(); + + // Navigator.of(context).pop(); + // setState(() {}); + // }, + // ), + // ], + // ); + // }), + // ); + // }, + // ), + // ], + // ); } void saveLesson() async { @@ -218,3 +230,197 @@ class LessonViewableState extends State { .storeCustomLessonDescriptions(lessonDesc, userId: user.id!); } } + +class TimetableLessonPopup extends StatelessWidget { + const TimetableLessonPopup({super.key, required this.lesson}); + + final Lesson lesson; + + static void show({ + required BuildContext context, + required Lesson lesson, + }) => + showRoundedModalBottomSheet( + context, + child: TimetableLessonPopup( + lesson: lesson, + ), + showHandle: false, + ); + + // IconData _getIcon() => _featureLevels[feature] == PremiumFeatureLevel.cap + // ? FilcIcons.kupak + // : _featureLevels[feature] == PremiumFeatureLevel.ink + // ? FilcIcons.tinta + // : FilcIcons.tinta; + // Color _getColor(BuildContext context) => + // _featureLevels[feature] == PremiumFeatureLevel.gold + // ? const Color(0xFFC89B08) + // : Theme.of(context).brightness == Brightness.light + // ? const Color(0xff691A9B) + // : const Color(0xffA66FC8); + // String? _getAsset() => _featureAssets[feature]; + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: Theme.of(context).scaffoldBackgroundColor, + borderRadius: const BorderRadius.vertical( + top: Radius.circular(12.0), + ), + ), + child: Stack( + children: [ + SvgPicture.asset( + "assets/svg/mesh_bg.svg", + // ignore: deprecated_member_use + color: ColorsUtils().fade( + context, Theme.of(context).scaffoldBackgroundColor, + darkenAmount: 0.1, lightenAmount: 0.1), + width: MediaQuery.of(context).size.width, + ), + SizedBox( + width: MediaQuery.of(context).size.width, + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 40, + height: 4, + decoration: BoxDecoration( + color: ColorsUtils().fade( + context, Theme.of(context).scaffoldBackgroundColor, + darkenAmount: 0.2, lightenAmount: 0.2), + borderRadius: BorderRadius.circular( + 2.0, + ), + ), + ), + const SizedBox( + height: 38.0, + ), + RoundBorderIcon( + icon: Icon( + SubjectIcon.resolveVariant( + context: context, subject: lesson.subject), + ), + ), + const SizedBox( + height: 55.0, + ), + Container( + width: double.infinity, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.background, + borderRadius: const BorderRadius.vertical( + top: Radius.circular(12.0), + bottom: Radius.circular(6.0), + ), + ), + padding: const EdgeInsets.all(14.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '6:09 - 4:20', + style: TextStyle( + color: AppColors.of(context).text.withOpacity(0.85), + fontSize: 14.0, + fontWeight: FontWeight.w500, + ), + ), + const SizedBox( + height: 12.0, + ), + Text( + lesson.name, + style: TextStyle( + color: AppColors.of(context).text, + fontSize: 20.0, + fontWeight: FontWeight.w700, + ), + ), + const SizedBox( + height: 8.0, + ), + Text( + lesson.teacher.name, + style: TextStyle( + color: AppColors.of(context).text.withOpacity(0.9), + fontSize: 14.0, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + ), + const SizedBox( + height: 6.0, + ), + Container( + width: double.infinity, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.background, + borderRadius: const BorderRadius.vertical( + top: Radius.circular(6.0), + bottom: Radius.circular(12.0), + ), + ), + padding: const EdgeInsets.all(14.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + lesson.description, + style: TextStyle( + color: AppColors.of(context).text.withOpacity(0.9), + fontSize: 14.0, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + const SizedBox( + height: 24.0, + ), + GestureDetector( + onTap: () { + Navigator.of(context, rootNavigator: true) + .pushReplacementNamed('/'); + }, + child: Container( + width: double.infinity, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.background, + borderRadius: BorderRadius.circular(12.0), + ), + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'view_subject'.i18n, + style: TextStyle( + color: + AppColors.of(context).text.withOpacity(0.9), + fontSize: 18.0, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/refilc_mobile_ui/lib/pages/absences/absences_page.dart b/refilc_mobile_ui/lib/pages/absences/absences_page.dart index 6b02ce1..ff339db 100644 --- a/refilc_mobile_ui/lib/pages/absences/absences_page.dart +++ b/refilc_mobile_ui/lib/pages/absences/absences_page.dart @@ -362,6 +362,7 @@ class AbsencesPageState extends State List unexcused = []; List excused = []; + List pending = []; List absencePositions = []; List finalChartColors = []; @@ -375,13 +376,14 @@ class AbsencesPageState extends State .where((e) => e.delay == 0 && e.state == Justification.excused) .toList(); + pending = absenceProvider.absences + .where((e) => + e.delay == 0 && e.state == Justification.pending) + .toList(); value1 = excused.length; value2 = unexcused.length; - value3 = absenceProvider.absences - .where((e) => - e.delay == 0 && e.state == Justification.pending) - .length; + value3 = pending.length; title1 = "stat_1".i18n; title2 = "stat_2".i18n; suffix = " ${"hr".i18n}"; @@ -394,15 +396,15 @@ class AbsencesPageState extends State .where((e) => e.delay != 0 && e.state == Justification.excused) .toList(); + pending = absenceProvider.absences + .where((e) => + e.delay != 0 && e.state == Justification.pending) + .toList(); value1 = excused.map((e) => e.delay).fold(0, (a, b) => a + b); value2 = unexcused.map((e) => e.delay).fold(0, (a, b) => a + b); - value3 = absenceProvider.absences - .where((e) => - e.delay != 0 && e.state == Justification.pending) - .map((e) => e.delay) - .fold(0, (a, b) => a + b); + value3 = pending.map((e) => e.delay).fold(0, (a, b) => a + b); title1 = "stat_3".i18n; title2 = "stat_4".i18n; suffix = " ${"min".i18n}"; @@ -417,7 +419,7 @@ class AbsencesPageState extends State int barTotal = DateTime.now().difference(DateTime(yr, 09, 01)).inDays; - [...unexcused, ...excused].forEachIndexed((i, a) { + [...unexcused, ...excused, ...pending].forEachIndexed((i, a) { int abs = DateTime.now().difference(a.date).inDays; double startPos = (barTotal - abs) / barTotal; @@ -435,11 +437,14 @@ class AbsencesPageState extends State end: endPos, color: a.state == Justification.excused ? Colors.green - : Colors.red, + : a.state == Justification.unexcused + ? Colors.red + : Colors.orange, )); - if ([...unexcused, ...excused].length > i + 1) { + if ([...unexcused, ...excused, ...pending].length > i + 1) { int nextAbs = DateTime.now() - .difference([...unexcused, ...excused][i + 1].date) + .difference( + [...unexcused, ...excused, ...pending][i + 1].date) .inDays; double nextStartPos = (barTotal - nextAbs) / barTotal; @@ -454,7 +459,8 @@ class AbsencesPageState extends State // print(value2.toString() + '-total'); // print(absenceChartData.length.toString() + '-chartdata'); - if ((i + 1 == [...unexcused, ...excused].length) && + if ((i + 1 == + [...unexcused, ...excused, ...pending].length) && endPos < 0.999) { absenceChartData.add(AbsenceChartData( start: endPos, 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..bc321e0 100644 --- a/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart +++ b/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart @@ -19,6 +19,7 @@ import 'package:refilc_kreta_api/models/grade.dart'; import 'package:refilc_kreta_api/models/subject.dart'; import 'package:refilc_mobile_ui/common/average_display.dart'; import 'package:refilc_mobile_ui/common/bottom_sheet_menu/rounded_bottom_sheet.dart'; +import 'package:refilc_mobile_ui/common/empty.dart'; import 'package:refilc_mobile_ui/common/filter_bar.dart'; import 'package:refilc_mobile_ui/common/panel/panel.dart'; import 'package:refilc_mobile_ui/common/splitted_panel/splitted_panel.dart'; @@ -281,7 +282,7 @@ class _GradeSubjectViewState extends State title: Text("exams".i18n), children: _tiles, )) - : const SizedBox(), + : const Empty(), ), ); diff --git a/refilc_mobile_ui/lib/pages/home/home_page.dart b/refilc_mobile_ui/lib/pages/home/home_page.dart index 5f45065..8939275 100644 --- a/refilc_mobile_ui/lib/pages/home/home_page.dart +++ b/refilc_mobile_ui/lib/pages/home/home_page.dart @@ -213,8 +213,8 @@ class HomePageState extends State with TickerProviderStateMixin { // } // TODO: REMOVE IN PRODUCTION BUILD!!! - print(_liveCard.currentState); - _liveCard.currentState = LiveCardState.morning; + // print(_liveCard.currentState); + _liveCard.currentState = LiveCardState.duringLesson; return Scaffold( body: Stack( @@ -326,9 +326,11 @@ class HomePageState extends State with TickerProviderStateMixin { expandedHeight: _liveCardAnimation.value * (_liveCard.currentState == LiveCardState.morning ? 274.0 - : (_liveCard.currentState == - LiveCardState.duringLesson - ? 288.0 + : ((_liveCard.currentState == + LiveCardState.duringLesson || + _liveCard.currentState == + LiveCardState.duringBreak) + ? 292.0 : 238.0)), // Live Card @@ -340,14 +342,21 @@ class HomePageState extends State with TickerProviderStateMixin { top: ((_liveCard.currentState == LiveCardState.morning || _liveCard.currentState == - LiveCardState.duringLesson) + LiveCardState.duringLesson || + _liveCard.currentState == + LiveCardState.duringBreak) ? 0.0 : 62.0) + MediaQuery.of(context).padding.top, - bottom: _liveCard.currentState == - LiveCardState.morning + bottom: (_liveCard.currentState == + LiveCardState.morning) ? 44.0 - : 52.0, + : ((_liveCard.currentState == + LiveCardState.duringLesson || + _liveCard.currentState == + LiveCardState.duringBreak) + ? 55.0 + : 52.0), ), child: Transform.scale( scale: _liveCardAnimation.value, diff --git a/refilc_mobile_ui/lib/pages/home/live_card/live_card.dart b/refilc_mobile_ui/lib/pages/home/live_card/live_card.dart index 2b52bbf..3cf6f4b 100644 --- a/refilc_mobile_ui/lib/pages/home/live_card/live_card.dart +++ b/refilc_mobile_ui/lib/pages/home/live_card/live_card.dart @@ -3,7 +3,6 @@ import 'package:animations/animations.dart'; import 'package:refilc/api/providers/user_provider.dart'; import 'package:refilc/helpers/subject.dart'; -import 'package:refilc/icons/filc_icons.dart'; import 'package:refilc/models/settings.dart'; import 'package:refilc/theme/colors/colors.dart'; import 'package:refilc/ui/widgets/lesson/lesson_tile.dart'; @@ -11,7 +10,9 @@ import 'package:refilc_kreta_api/models/category.dart'; import 'package:refilc_kreta_api/models/lesson.dart'; import 'package:refilc_kreta_api/models/subject.dart'; import 'package:refilc_kreta_api/models/teacher.dart'; +import 'package:refilc_mobile_ui/common/panel/panel.dart'; import 'package:refilc_mobile_ui/common/progress_bar.dart'; +import 'package:refilc_mobile_ui/common/round_border_icon.dart'; // import 'package:refilc_kreta_api/models/category.dart'; // import 'package:refilc_kreta_api/models/lesson.dart'; // import 'package:refilc_kreta_api/models/subject.dart'; @@ -70,8 +71,8 @@ class LiveCardStateA extends State { // test // TODO: REMOVE IN PRODUCTION BUILD!!! - liveCard.currentState = LiveCardState.morning; - liveCard.nextLesson = Lesson( + liveCard.currentState = LiveCardState.duringLesson; + liveCard.currentLesson = Lesson( date: DateTime.now().add(Duration( minutes: 30, )), @@ -93,7 +94,7 @@ class LiveCardStateA extends State { name: 'name', ); - // liveCard.nextLesson = liveCard.currentLesson; + liveCard.nextLesson = liveCard.currentLesson; // final dt = DateTime(2024, 3, 22, 17, 12, 1, 1, 1); @@ -304,7 +305,7 @@ class LiveCardStateA extends State { width: 10, ), Text( - '${DateFormat('H:mm').format(liveCard.nextLesson!.start)}-${DateFormat('H:mm').format(liveCard.nextLesson!.end)}', + '${DateFormat('H:mm').format(liveCard.nextLesson!.start)} - ${DateFormat('H:mm').format(liveCard.nextLesson!.end)}', style: const TextStyle( fontSize: 12.5, fontWeight: FontWeight.w500, @@ -411,8 +412,9 @@ class LiveCardStateA extends State { swapRoom: true, currentLessonIndicator: false, padding: - const EdgeInsets.only(top: 8.0, bottom: 4.0), + const EdgeInsets.only(top: 6.0, bottom: 4.0), contentPadding: EdgeInsets.zero, + showSubTiles: false, ), if (!(nextSubject == null && progressCurrent == null && @@ -523,7 +525,7 @@ class LiveCardStateA extends State { decoration: BoxDecoration( color: Theme.of(context) .colorScheme - .secondary + .tertiary .withOpacity(.15), borderRadius: BorderRadius.circular(10.0), @@ -546,7 +548,7 @@ class LiveCardStateA extends State { width: 10, ), Text( - '${DateFormat('H:mm').format(liveCard.nextLesson!.start)}-${DateFormat('H:mm').format(liveCard.nextLesson!.end)}', + '${DateFormat('H:mm').format(liveCard.nextLesson!.start)} - ${DateFormat('H:mm').format(liveCard.nextLesson!.end)}', style: const TextStyle( fontSize: 12.5, fontWeight: FontWeight.w500, @@ -566,12 +568,17 @@ class LiveCardStateA extends State { ); break; case LiveCardState.duringBreak: - final iconFloorMap = { - "to room": FeatherIcons.chevronsRight, - "up floor": FilcIcons.upstairs, - "down floor": FilcIcons.downstairs, - "ground floor": FilcIcons.downstairs, - }; + if (liveCard.prevLesson == null || liveCard.nextLesson == null) { + child = Container(); + break; + } + + // final iconFloorMap = { + // "to room": FeatherIcons.chevronsRight, + // "up floor": FilcIcons.upstairs, + // "down floor": FilcIcons.downstairs, + // "ground floor": FilcIcons.downstairs, + // }; final diff = liveCard.getFloorDifference(); @@ -587,36 +594,352 @@ class LiveCardStateA extends State { final showMinutes = maxTime - elapsedTime > 60; + // child = LiveCardWidget( + // key: const Key('livecard.duringBreak'), + // title: "break".i18n, + // icon: iconFloorMap[diff], + // description: liveCard.nextLesson!.room != liveCard.prevLesson!.room + // ? Text("go $diff".i18n.fill([ + // diff != "to room" + // ? (liveCard.nextLesson!.getFloor() ?? 0) + // : liveCard.nextLesson!.room + // ])) + // : Text("stay".i18n), + // nextSubject: liveCard.nextLesson?.subject.renamedTo ?? + // liveCard.nextLesson?.subject.name.capital(), + // nextSubjectItalic: liveCard.nextLesson?.subject.isRenamed == true && + // settingsProvider.renamedSubjectsItalics, + // nextRoom: diff != "to room" ? liveCard.nextLesson?.room : null, + // progressMax: showMinutes ? maxTime / 60 : maxTime, + // progressCurrent: showMinutes ? elapsedTime / 60 : elapsedTime, + // progressAccuracy: + // showMinutes ? ProgressAccuracy.minutes : ProgressAccuracy.seconds, + // onProgressTap: () { + // showDialog( + // barrierColor: Colors.black, + // context: context, + // builder: (context) => HeadsUpCountdown( + // maxTime: maxTime, + // elapsedTime: elapsedTime, + // ), + // ); + // }, + // ); + + var nextSubject = liveCard.nextLesson?.subject.renamedTo ?? + liveCard.nextLesson?.subject.name.capital(); + var nextSubjectItalic = + liveCard.nextLesson?.subject.isRenamed == true && + settingsProvider.renamedSubjectsItalics; + // var nextRoom = diff != "to room" ? liveCard.nextLesson?.room : null; + var progressMax = showMinutes ? maxTime / 60 : maxTime; + var progressCurrent = showMinutes ? elapsedTime / 60 : elapsedTime; + var progressAccuracy = + showMinutes ? ProgressAccuracy.minutes : ProgressAccuracy.seconds; + + // Lesson breakLesson = Lesson( + // date: DateTime.now(), + // start: liveCard.prevLesson!.end, + // end: liveCard.nextLesson!.start, + // name: 'break'.i18n, + // description: 'Menj a XY terembe...', + // ); + child = LiveCardWidget( key: const Key('livecard.duringBreak'), - title: "break".i18n, - icon: iconFloorMap[diff], - description: liveCard.nextLesson!.room != liveCard.prevLesson!.room - ? Text("go $diff".i18n.fill([ - diff != "to room" - ? (liveCard.nextLesson!.getFloor() ?? 0) - : liveCard.nextLesson!.room - ])) - : Text("stay".i18n), - nextSubject: liveCard.nextLesson?.subject.renamedTo ?? - liveCard.nextLesson?.subject.name.capital(), - nextSubjectItalic: liveCard.nextLesson?.subject.isRenamed == true && - settingsProvider.renamedSubjectsItalics, - nextRoom: diff != "to room" ? liveCard.nextLesson?.room : null, - progressMax: showMinutes ? maxTime / 60 : maxTime, - progressCurrent: showMinutes ? elapsedTime / 60 : elapsedTime, - progressAccuracy: - showMinutes ? ProgressAccuracy.minutes : ProgressAccuracy.seconds, - onProgressTap: () { - showDialog( - barrierColor: Colors.black, - context: context, - builder: (context) => HeadsUpCountdown( - maxTime: maxTime, - elapsedTime: elapsedTime, - ), - ); - }, + children: liveCard.nextLesson != null + ? [ + SplittedPanel( + hasShadow: false, + padding: EdgeInsets.zero, + cardPadding: EdgeInsets.zero, + spacing: 8.0, + children: [ + SplittedPanel( + hasShadow: false, + isTransparent: true, + padding: EdgeInsets.zero, + cardPadding: const EdgeInsets.symmetric( + horizontal: 12.0, + vertical: 0.0, + ), + spacing: 0.0, + children: [ + // LessonTile( + // liveCard.currentLesson!, + // swapRoom: true, + // currentLessonIndicator: false, + // padding: + // const EdgeInsets.only(top: 8.0, bottom: 4.0), + // contentPadding: EdgeInsets.zero, + // ), + Padding( + padding: + const EdgeInsets.only(top: 8.0, bottom: 4.0), + child: Material( + color: Colors.transparent, + borderRadius: BorderRadius.circular(12.0), + child: Visibility( + visible: + liveCard.nextLesson!.subject.id != '' || + liveCard.nextLesson!.isEmpty, + replacement: Padding( + padding: const EdgeInsets.only(top: 6.0), + child: PanelTitle( + title: Text(liveCard.nextLesson!.name)), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ListTile( + minVerticalPadding: 0.0, + dense: true, + // onLongPress: kDebugMode ? () => log(jsonEncode(lesson.json)) : null, + visualDensity: VisualDensity.compact, + contentPadding: EdgeInsets.zero, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(12.0)), + title: Text( + "break".i18n, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 16.5, + color: AppColors.of(context) + .text + .withOpacity(!liveCard + .nextLesson!.isEmpty + ? 1.0 + : 0.5), + fontStyle: liveCard.nextLesson! + .subject.isRenamed && + settingsProvider + .renamedSubjectsItalics + ? FontStyle.italic + : null), + ), + + subtitle: DefaultTextStyle( + style: Theme.of(context) + .textTheme + .bodyMedium! + .copyWith( + fontWeight: FontWeight.w400, + fontSize: 15.0, + height: 1.0, + color: AppColors.of(context) + .text + .withOpacity(.75), + ), + maxLines: !(nextSubject == null && + progressCurrent == null && + progressMax == null) + ? 1 + : 2, + softWrap: false, + overflow: TextOverflow.ellipsis, + child: liveCard.nextLesson!.room != + liveCard.prevLesson!.room + ? Text("go $diff".i18n.fill([ + diff != "to room" + ? (liveCard.nextLesson! + .getFloor() ?? + 0) + : liveCard.nextLesson!.room + ])) + : Text("stay".i18n), + ), + + // subtitle: description != "" + // ? Text( + // description, + // style: const TextStyle( + // fontWeight: FontWeight.w500, + // fontSize: 14.0, + // ), + // maxLines: 1, + // softWrap: false, + // overflow: TextOverflow.ellipsis, + // ) + // : null, + minLeadingWidth: 34.0, + leading: AspectRatio( + aspectRatio: 1, + child: Center( + child: Stack( + children: [ + RoundBorderIcon( + color: + AppColors.of(context).text, + width: 1.0, + icon: const SizedBox( + width: 25, + height: 25, + child: Center( + child: Icon( + Icons.local_cafe, + size: 20.0, + ), + ), + ), + ), + ], + ), + ), + ), + trailing: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox( + width: 10, + ), + Stack( + alignment: Alignment.center, + children: [ + // xix alignment hack :p + const Opacity( + opacity: 0, + child: Text("EE:EE")), + Text( + "${DateFormat("H:mm").format(liveCard.prevLesson!.end)}\n${DateFormat("H:mm").format(liveCard.nextLesson!.start)}", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.w500, + color: AppColors.of(context) + .text + .withOpacity(.9), + ), + ), + ], + ), + ], + ), + ), + ], + ), + ), + ), + ), + if (!(nextSubject == null && + progressCurrent == null && + progressMax == null)) + Row( + children: [ + const SizedBox( + width: 5.0, + ), + if (progressCurrent != null && + progressMax != null) + GestureDetector( + onTap: () { + showDialog( + barrierColor: Colors.black, + context: context, + builder: (context) => HeadsUpCountdown( + maxTime: maxTime, + elapsedTime: elapsedTime), + ); + }, + child: Container( + color: Colors.transparent, + child: Text( + "remaining ${progressAccuracy == ProgressAccuracy.minutes ? 'min' : 'sec'}" + .plural( + (progressMax - progressCurrent) + .round()), + maxLines: 1, + style: TextStyle( + fontWeight: FontWeight.w500, + color: AppColors.of(context) + .text + .withOpacity(.75), + height: 1.1, + ), + ), + ), + ) + ], + ), + if (progressCurrent != null && progressMax != null) + Padding( + padding: + const EdgeInsets.only(top: 4.0, bottom: 12.0), + child: ProgressBar( + value: progressCurrent / progressMax), + ) + ], + ), + SplittedPanel( + hasShadow: false, + isTransparent: true, + padding: EdgeInsets.zero, + cardPadding: const EdgeInsets.symmetric( + horizontal: 18.0, + vertical: 11.0, + ), + spacing: 0.0, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Icon( + liveCard.nextLesson == null + ? Icons.home_outlined + : SubjectIcon.resolveVariant( + context: context, + subject: + liveCard.nextLesson!.subject, + ), + size: 23.0, + ), + const SizedBox(width: 12.0), + Text( + (liveCard.nextLesson?.subject + .isRenamed ?? + false + ? liveCard + .nextLesson?.subject.renamedTo + : liveCard + .nextLesson?.subject.name) ?? + 'go_home'.i18n, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontStyle: nextSubjectItalic + ? FontStyle.italic + : null, + ), + ), + ], + ), + Row( + children: liveCard.nextLesson != null + ? [ + const SizedBox( + width: 10, + ), + Text( + '${DateFormat('H:mm').format(liveCard.nextLesson!.start)} - ${DateFormat('H:mm').format(liveCard.nextLesson!.end)}', + style: const TextStyle( + fontSize: 12.5, + fontWeight: FontWeight.w500, + ), + ), + ] + : [], + ), + ], + ), + ], + ), + ], + ), + ] + : null, ); break; case LiveCardState.afternoon: diff --git a/refilc_mobile_ui/lib/pages/home/live_card/live_card.i18n.dart b/refilc_mobile_ui/lib/pages/home/live_card/live_card.i18n.dart index 6677ba0..da48ce6 100644 --- a/refilc_mobile_ui/lib/pages/home/live_card/live_card.i18n.dart +++ b/refilc_mobile_ui/lib/pages/home/live_card/live_card.i18n.dart @@ -19,7 +19,7 @@ extension Localization on String { "first_lesson_4": ".", // segmented countdown "h": "hour(s)", - "m": "minute(s)", + "m": "min(s)", "s": "sec(s)", // v5 "first_lesson_soon": "Your first lesson starts soon!", diff --git a/refilc_mobile_ui/lib/pages/home/live_card/live_card_widget.dart b/refilc_mobile_ui/lib/pages/home/live_card/live_card_widget.dart index 306c15b..07f3933 100644 --- a/refilc_mobile_ui/lib/pages/home/live_card/live_card_widget.dart +++ b/refilc_mobile_ui/lib/pages/home/live_card/live_card_widget.dart @@ -1,11 +1,9 @@ -import 'package:refilc/api/providers/live_card_provider.dart'; import 'package:refilc/models/settings.dart'; import 'package:refilc/theme/colors/colors.dart'; import 'package:refilc_mobile_ui/common/progress_bar.dart'; import 'package:flutter/material.dart'; import 'package:flutter_feather_icons/flutter_feather_icons.dart'; import 'package:provider/provider.dart'; -import 'package:refilc_mobile_ui/pages/home/live_card/live_card.dart'; import 'live_card.i18n.dart'; enum ProgressAccuracy { minutes, seconds } diff --git a/refilc_mobile_ui/lib/pages/notes/notes_page.dart b/refilc_mobile_ui/lib/pages/notes/notes_page.dart index c5ee6c5..61ff85c 100644 --- a/refilc_mobile_ui/lib/pages/notes/notes_page.dart +++ b/refilc_mobile_ui/lib/pages/notes/notes_page.dart @@ -135,13 +135,19 @@ class NotesPageState extends State with TickerProviderStateMixin { title: Text('your_notes'.i18n), padding: EdgeInsets.zero, isTransparent: true, - child: Center( - child: Wrap( - spacing: 18.0, - runSpacing: 18.0, - children: selfNoteTiles, - ), - ), + child: selfNoteTiles.length > 1 + ? Center( + child: Wrap( + spacing: 18.0, + runSpacing: 18.0, + children: selfNoteTiles, + ), + ) + : Wrap( + spacing: 18.0, + runSpacing: 18.0, + children: selfNoteTiles, + ), )); } diff --git a/refilc_mobile_ui/lib/screens/login/login_screen.dart b/refilc_mobile_ui/lib/screens/login/login_screen.dart index fd21903..3f99c7d 100644 --- a/refilc_mobile_ui/lib/screens/login/login_screen.dart +++ b/refilc_mobile_ui/lib/screens/login/login_screen.dart @@ -122,7 +122,7 @@ class LoginScreenState extends State { type: MaterialType.transparency, child: showBack ? BackButton( - color: AppColors.of(context).loginPrimary) + color: AppColors.of(context).text) : const SizedBox(height: 48.0), ), ], @@ -130,9 +130,131 @@ class LoginScreenState extends State { Stack( alignment: Alignment.bottomCenter, children: [ + // 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: const TextStyle( + // color: Color(0xFF050B15), + // 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( + // color: + // Color(0xFF050B15), + // 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')) + // ], + // ); + // }, + // ); + // }).toList(), + // ), + // ], + // ), + // Container( + // height: 250, + // width: double.infinity, + // decoration: const BoxDecoration( + // gradient: LinearGradient( + // colors: [Color(0x00DAE4F7), Color(0xFFDAE4F7)], + // stops: [0, 0.1], + // begin: Alignment.topCenter, + // end: Alignment.bottomCenter, + // ), + // ), + // child: Padding( + // padding: const EdgeInsets.only(top: 3), + // child: Column( + // children: [ + // SizedBox( + // height: 48, + // width: double.infinity, + // child: Padding( + // padding: const EdgeInsets.symmetric( + // horizontal: 16), + // child: FilledButton( + // style: ButtonStyle( + // shape: MaterialStateProperty.all< + // RoundedRectangleBorder>( + // const RoundedRectangleBorder( + // borderRadius: BorderRadius.all( + // Radius.circular(12)), + // ))), + // onPressed: () {}, + // child: Text( + // "login".i18n, + // style: const TextStyle( + // fontFamily: 'Montserrat', + // fontSize: 20, + // fontWeight: FontWeight.w700), + // )), + // ), + // ), + // const SizedBox(height: 8), + // ], + // ), + // ), + // ) + // + // + // TODO: OLD LOGIN FROM HERE Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, + //login buttons and ui starts here + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, children: [ const SizedBox(height: 21), CarouselSlider( @@ -190,12 +312,12 @@ class LoginScreenState extends State { ), ], )), - const SizedBox(height: 15.625), //meth - // Padding( - // padding: const EdgeInsets.only( - // left: 16, right: 16), - // child: Image.asset( - // 'assets/images/showcase$i.png')) + const SizedBox(height: 15.625), + Padding( + padding: const EdgeInsets.only( + left: 16, right: 16), + child: Image.asset( + 'assets/images/showcase$i.png')) ], ); }, @@ -210,7 +332,7 @@ class LoginScreenState extends State { decoration: const BoxDecoration( gradient: LinearGradient( colors: [Color(0x00DAE4F7), Color(0xFFDAE4F7)], - stops: [0, 0.05], + stops: [0, 0.1], begin: Alignment.topCenter, end: Alignment.bottomCenter, ), @@ -238,7 +360,7 @@ class LoginScreenState extends State { "login".i18n, style: const TextStyle( fontFamily: 'Montserrat', - fontSize: 19, + fontSize: 20, fontWeight: FontWeight.w700), )), ),