From f79fd4fa61b6be41bc9d083aa280aaebc797301e Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 9 Oct 2024 11:39:01 +0300 Subject: [PATCH] feat(consultant): --- lib/app_router.dart | 3 +- .../chat/presentation/pages/chat_screen.dart | 12 +-- .../certificates_and_diplomas_screen.dart | 30 ++++++- .../stepper_become_consultant_screen.dart | 83 +++++++++++++++++-- .../presentation/pages/other_info_screen.dart | 14 ++-- lib/widgets/custom_expandable_list.dart | 3 +- 6 files changed, 124 insertions(+), 21 deletions(-) diff --git a/lib/app_router.dart b/lib/app_router.dart index 4c066394..2f1f53e4 100644 --- a/lib/app_router.dart +++ b/lib/app_router.dart @@ -235,7 +235,8 @@ class AppRouter { path: '/become-consultant-screen', name: 'becomeConsultantScreen', builder: (context, state) => BecomeConsultantScreen(), - ),GoRoute( + ), + GoRoute( path: '/stepper-become-consultant-screen', name: 'stepperBecomeConsultantScreen', builder: (context, state) => StepperBecomeConsultantScreen(), diff --git a/lib/features/chat/presentation/pages/chat_screen.dart b/lib/features/chat/presentation/pages/chat_screen.dart index ae20444b..ee50e04d 100644 --- a/lib/features/chat/presentation/pages/chat_screen.dart +++ b/lib/features/chat/presentation/pages/chat_screen.dart @@ -238,9 +238,9 @@ class _ChatScreenState extends State { if (result != null) { List files = result.paths.map((path) => File(path!)).toList(); chatRoomCubit.sendMessage( - chatId: widget.chatId, - files: files, - ); + chatId: widget.chatId, + files: files, + ); } else { // User canceled the picker } @@ -309,9 +309,9 @@ class _ChatScreenState extends State { onTap: () { if (textEditingController.text.isNotEmpty) { chatRoomCubit.sendMessage( - chatId: widget.chatId, - data: textEditingController.text.trim(), - ); + chatId: widget.chatId, + data: textEditingController.text.trim(), + ); setState(() { textEditingController.clear(); }); diff --git a/lib/features/consultant/become_consultant/presentation/pages/certificates_and_diplomas_screen.dart b/lib/features/consultant/become_consultant/presentation/pages/certificates_and_diplomas_screen.dart index f3a0a670..1eb412f7 100644 --- a/lib/features/consultant/become_consultant/presentation/pages/certificates_and_diplomas_screen.dart +++ b/lib/features/consultant/become_consultant/presentation/pages/certificates_and_diplomas_screen.dart @@ -1,4 +1,5 @@ import 'package:eatvio_app/features/consultant/become_consultant/entities/diploma_entity.dart'; +import 'package:eatvio_app/theme/theme_helper.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -165,7 +166,34 @@ class _CertificatesAndDiplomasScreenState extends State Container( + padding: EdgeInsets.all(16), + width: MediaQuery.of(context).size.width, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'Спасибо!\nВаши данные отправлены на модерацию', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 20, + height: 1, + fontWeight: FontWeight.w600, + ), + ), + const SizedBox(height: 16), + Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: appTheme.blueA400, + shape: BoxShape.circle, + ), + child: Icon( + size: 32, + Icons.done, + color: Colors.white, + ), + ), + const SizedBox(height: 16), + Text( + 'В течении трех рабочих дней Вам придет уведомление о смене статуса', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + height: 1, + fontWeight: FontWeight.w500, + ), + ), + const SizedBox(height: 16), + InkWell( + onTap: () { + Navigator.of(context).pop(); + }, + child: Ink( + width: MediaQuery.of(context).size.width - 32, + height: 52, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: appTheme.blueA400, + ), + child: Center( + child: Text( + 'Закрыть', + style: TextStyle( + color: Colors.white, + fontSize: 18, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ], + ), + ), ); - }); + } else { + setState(() { + pageController.nextPage( + duration: const Duration(milliseconds: 350), + curve: Curves.easeInOut, + ); + }); + } }, label: Text( 'Продолжить', diff --git a/lib/features/settings/presentation/pages/other_info_screen.dart b/lib/features/settings/presentation/pages/other_info_screen.dart index 2799b853..f9dfc9e1 100644 --- a/lib/features/settings/presentation/pages/other_info_screen.dart +++ b/lib/features/settings/presentation/pages/other_info_screen.dart @@ -128,13 +128,13 @@ class _OtherInfoScreenState extends State { onTap: () { widget.settingsEntity.settingsCubit.updateProfileDetails( profileDetailsModel: (widget.settingsEntity.settingsCubit.state as SettingsStateLoaded).profileDetails.copyWith( - aboutAlergy: aboutAllergyController.text, - aboutTakingPils: aboutTakingPillsController.text, - aboutSportHobbies: aboutSportHobbiesController.text, - favoriteFoods: favoriteFoodsController.text, - unfavoriteFoods: unFavouriteFoodsController.text, - additionalInfo: additionalInfoController.text, - ), + aboutAlergy: aboutAllergyController.text, + aboutTakingPils: aboutTakingPillsController.text, + aboutSportHobbies: aboutSportHobbiesController.text, + favoriteFoods: favoriteFoodsController.text, + unfavoriteFoods: unFavouriteFoodsController.text, + additionalInfo: additionalInfoController.text, + ), ); GoRouter.of(context).pop(); }, diff --git a/lib/widgets/custom_expandable_list.dart b/lib/widgets/custom_expandable_list.dart index dfda23f9..ff29bc86 100644 --- a/lib/widgets/custom_expandable_list.dart +++ b/lib/widgets/custom_expandable_list.dart @@ -1,5 +1,5 @@ import 'dart:convert'; -import 'package:rive/rive.dart' as rive; + import 'package:eatvio_app/core/const.dart'; import 'package:eatvio_app/core/token_storage.dart'; import 'package:eatvio_app/generated/l10n.dart'; @@ -14,6 +14,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; import 'package:http/http.dart' as http; import 'package:intl/intl.dart'; +import 'package:rive/rive.dart' as rive; class ExpandableList extends StatefulWidget { final String title;