From e80f5478c7283795f0503159f1f1f1bb976f2dda Mon Sep 17 00:00:00 2001 From: Sergey Dmitriev <51058739+0niel@users.noreply.github.com> Date: Sat, 7 Sep 2024 20:17:31 +0300 Subject: [PATCH] ui: Add new SVG icons for left and right arrows --- .../hugeicons/square-arrow-left-01-round.svg | 4 ++ .../hugeicons/square-arrow-right-01-round.svg | 4 ++ lib/gen/assets.gen.dart | 9 +++++ .../widgets/calendar/calendar_header.dart | 12 +++--- lib/schedule/widgets/lesson_card.dart | 38 +++++++++---------- pubspec.yaml | 2 +- 6 files changed, 43 insertions(+), 26 deletions(-) create mode 100644 assets/icons/hugeicons/square-arrow-left-01-round.svg create mode 100644 assets/icons/hugeicons/square-arrow-right-01-round.svg diff --git a/assets/icons/hugeicons/square-arrow-left-01-round.svg b/assets/icons/hugeicons/square-arrow-left-01-round.svg new file mode 100644 index 00000000..166d36d4 --- /dev/null +++ b/assets/icons/hugeicons/square-arrow-left-01-round.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/hugeicons/square-arrow-right-01-round.svg b/assets/icons/hugeicons/square-arrow-right-01-round.svg new file mode 100644 index 00000000..0d98662e --- /dev/null +++ b/assets/icons/hugeicons/square-arrow-right-01-round.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 48bb439f..dd6324ca 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -224,6 +224,13 @@ class $AssetsIconsHugeiconsGen { /// File path: assets/icons/hugeicons/setting-05.svg SvgGenImage get setting05 => const SvgGenImage('assets/icons/hugeicons/setting-05.svg'); + /// File path: assets/icons/hugeicons/square-arrow-left-01-round.svg + SvgGenImage get squareArrowLeft01Round => const SvgGenImage('assets/icons/hugeicons/square-arrow-left-01-round.svg'); + + /// File path: assets/icons/hugeicons/square-arrow-right-01-round.svg + SvgGenImage get squareArrowRight01Round => + const SvgGenImage('assets/icons/hugeicons/square-arrow-right-01-round.svg'); + /// File path: assets/icons/hugeicons/student-card.svg SvgGenImage get studentCard => const SvgGenImage('assets/icons/hugeicons/student-card.svg'); @@ -284,6 +291,8 @@ class $AssetsIconsHugeiconsGen { search, setting01, setting05, + squareArrowLeft01Round, + squareArrowRight01Round, studentCard, tag01, teaching, diff --git a/lib/schedule/widgets/calendar/calendar_header.dart b/lib/schedule/widgets/calendar/calendar_header.dart index 96668ef2..1f191edb 100644 --- a/lib/schedule/widgets/calendar/calendar_header.dart +++ b/lib/schedule/widgets/calendar/calendar_header.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:hugeicons/hugeicons.dart'; import 'package:intl/intl.dart'; +import 'package:rtu_mirea_app/gen/assets.gen.dart'; import 'package:rtu_mirea_app/presentation/theme.dart'; import 'package:rtu_mirea_app/presentation/typography.dart'; import 'package:table_calendar/table_calendar.dart'; @@ -216,9 +218,8 @@ class _CalendarWeeksHeader extends StatelessWidget { padding: EdgeInsets.zero, backgroundColor: Colors.transparent, ), - child: Icon( - Icons.arrow_back_ios_rounded, - size: 18, + child: HugeIcon( + icon: HugeIcons.strokeRoundedArrowLeft01, color: AppTheme.colorsOf(context).active, ), onPressed: () { @@ -282,9 +283,8 @@ class _CalendarWeeksHeader extends StatelessWidget { curve: Curves.easeIn, ); }, - child: Icon( - Icons.arrow_forward_ios_rounded, - size: 18, + child: HugeIcon( + icon: HugeIcons.strokeRoundedArrowRight01, color: AppTheme.colorsOf(context).active, ), ), diff --git a/lib/schedule/widgets/lesson_card.dart b/lib/schedule/widgets/lesson_card.dart index 4d8412d8..d7f37635 100644 --- a/lib/schedule/widgets/lesson_card.dart +++ b/lib/schedule/widgets/lesson_card.dart @@ -3,6 +3,7 @@ import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:get/get.dart'; +import 'package:hugeicons/hugeicons.dart'; import 'package:rtu_mirea_app/presentation/typography.dart'; import 'package:rtu_mirea_app/presentation/theme.dart'; import 'package:rtu_mirea_app/schedule/models/models.dart'; @@ -81,7 +82,7 @@ class LessonCard extends StatelessWidget { .join(', '); } - Widget _buildCommentAlert(List comments) { + Widget _buildCommentAlert(BuildContext context, List comments) { final comment = comments.firstWhereOrNull( (comment) => lesson.dates.contains(comment.lessonDate) && comment.lessonBells == lesson.lessonBells, ); @@ -99,8 +100,9 @@ class LessonCard extends StatelessWidget { ), child: Row( children: [ - const FaIcon( - FontAwesomeIcons.comment, + HugeIcon( + icon: HugeIcons.strokeRoundedComment01, + color: AppTheme.colorsOf(context).deactive, size: 16, ), const SizedBox( @@ -216,16 +218,13 @@ class LessonCard extends StatelessWidget { Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.only(top: 2), - child: FaIcon( - FontAwesomeIcons.mapLocation, - size: 12, - color: AppTheme.colorsOf(context).deactive, - ), + HugeIcon( + icon: HugeIcons.strokeRoundedUniversity, + size: 16, + color: AppTheme.colorsOf(context).deactive, ), const SizedBox( - width: 6.5, + width: 6, ), Expanded( child: Text( @@ -252,9 +251,9 @@ class LessonCard extends StatelessWidget { children: [ Padding( padding: const EdgeInsets.only(top: 2), - child: FaIcon( - FontAwesomeIcons.users, - size: 12, + child: HugeIcon( + icon: HugeIcons.strokeRoundedUserGroup, + size: 16, color: AppTheme.colorsOf(context).deactive, ), ), @@ -278,13 +277,14 @@ class LessonCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(left: 2, right: 8, top: 3), - child: FaIcon( - FontAwesomeIcons.userTie, - size: 12, + padding: const EdgeInsets.only(top: 3), + child: HugeIcon( + icon: HugeIcons.strokeRoundedTeacher, + size: 16, color: AppTheme.colorsOf(context).deactive, ), ), + const SizedBox(width: 6), Expanded( child: Text( lesson.teachers.map((e) => e.name).join(', '), @@ -308,7 +308,7 @@ class LessonCard extends StatelessWidget { return ch; }, ), - _buildCommentAlert(state.comments), + _buildCommentAlert(context, state.comments), _buildGroupIndicator() ], ), diff --git a/pubspec.yaml b/pubspec.yaml index 0e9c0ef7..eb527f6c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: rtu_mirea_app description: Mobile application for students of RTU MIREA publish_to: 'none' -version: 1.5.8+103 +version: 1.5.8+104 environment: sdk: ">=3.1.1"