feat(consultant):

This commit is contained in:
mso7nueh
2024-10-09 11:39:01 +03:00
parent 3fba10b73f
commit f79fd4fa61
6 changed files with 124 additions and 21 deletions

View File

@@ -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(),

View File

@@ -238,9 +238,9 @@ class _ChatScreenState extends State<ChatScreen> {
if (result != null) {
List<File> 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<ChatScreen> {
onTap: () {
if (textEditingController.text.isNotEmpty) {
chatRoomCubit.sendMessage(
chatId: widget.chatId,
data: textEditingController.text.trim(),
);
chatId: widget.chatId,
data: textEditingController.text.trim(),
);
setState(() {
textEditingController.clear();
});

View File

@@ -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<CertificatesAndDiplomasS
color: CupertinoColors.systemBackground.resolveFrom(context),
child: SafeArea(
top: false,
child: child,
child: Column(
children: [
child,
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,
),
),
),
),
),
],
),
),
),
);

View File

@@ -69,12 +69,85 @@ class _StepperBecomeConsultantScreenState extends State<StepperBecomeConsultantS
),
backgroundColor: appTheme.blueA400,
onPressed: () async {
setState(() {
pageController.nextPage(
duration: const Duration(milliseconds: 350),
curve: Curves.easeInOut,
if (step == 6) {
await showModalBottomSheet(
useRootNavigator: true,
showDragHandle: true,
context: context,
builder: (context) => 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(
'Продолжить',

View File

@@ -128,13 +128,13 @@ class _OtherInfoScreenState extends State<OtherInfoScreen> {
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();
},

View File

@@ -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;