diff --git a/lib/app_router.dart b/lib/app_router.dart index e54fe2da..7b4751e0 100644 --- a/lib/app_router.dart +++ b/lib/app_router.dart @@ -7,6 +7,8 @@ import 'package:eatvio_app/features/calendar/presentation/pages/calendar_screen. import 'package:eatvio_app/features/chat/presentation/pages/chat_screen.dart'; import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen.dart'; import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart'; +import 'package:eatvio_app/features/consultant/become_consultant/pages/become_consultant_screen.dart'; +import 'package:eatvio_app/features/consultant/become_consultant/pages/stepper_become_consultant_screen.dart'; import 'package:eatvio_app/features/diary/presentation/pages/diary_screen.dart'; import 'package:eatvio_app/features/diets/presentation/pages/about_diet_screen.dart'; import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart'; @@ -221,6 +223,15 @@ class AppRouter { name: 'mySettingsScreen', builder: (context, state) => MySettingsScreen.builder(context), ), + GoRoute( + path: '/become-consultant-screen', + name: 'becomeConsultantScreen', + builder: (context, state) => BecomeConsultantScreen(), + ),GoRoute( + path: '/stepper-become-consultant-screen', + name: 'stepperBecomeConsultantScreen', + builder: (context, state) => StepperBecomeConsultantScreen(), + ), GoRoute( path: '/recipe-select-screen', name: 'recipeSelectScreen', diff --git a/lib/features/consultant/become_consultant/pages/become_consultant_screen.dart b/lib/features/consultant/become_consultant/pages/become_consultant_screen.dart new file mode 100644 index 00000000..bf7ec475 --- /dev/null +++ b/lib/features/consultant/become_consultant/pages/become_consultant_screen.dart @@ -0,0 +1,58 @@ +import 'package:eatvio_app/theme/theme_helper.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; + +class BecomeConsultantScreen extends StatefulWidget { + const BecomeConsultantScreen({super.key}); + + @override + State createState() => _BecomeConsultantScreenState(); +} + +class _BecomeConsultantScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Стать консультантом'), + automaticallyImplyLeading: false, + centerTitle: false, + leading: IconButton( + onPressed: () => GoRouter.of(context).pop(), + icon: Icon(Icons.close), + ), + ), + body: Padding( + padding: const EdgeInsets.all(16), + child: Text('Для регистрации потребуется следующий список документов, подготовьте их заранее'), + ), + bottomSheet: _startRegistrationButton(), + ); + } + + _startRegistrationButton() { + return InkWell( + onTap: () => GoRouter.of(context).pushReplacementNamed('stepperBecomeConsultantScreen'), + borderRadius: BorderRadius.circular(20), + child: Ink( + height: 52, + width: MediaQuery.of(context).size.width - 32, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: appTheme.blueA400, + ), + child: Center( + child: Text( + 'Начать регистрацию', + style: TextStyle( + color: Colors.white, + height: 1, + fontWeight: FontWeight.w600, + fontSize: 18, + ), + ), + ), + ), + ); + } +} diff --git a/lib/features/consultant/become_consultant/pages/stepper_become_consultant_screen.dart b/lib/features/consultant/become_consultant/pages/stepper_become_consultant_screen.dart new file mode 100644 index 00000000..5b010215 --- /dev/null +++ b/lib/features/consultant/become_consultant/pages/stepper_become_consultant_screen.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; + +class StepperBecomeConsultantScreen extends StatefulWidget { + const StepperBecomeConsultantScreen({super.key}); + + @override + State createState() => _StepperBecomeConsultantScreenState(); +} + +class _StepperBecomeConsultantScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + leading: IconButton( + onPressed: () => GoRouter.of(context).pop(), + icon: Icon(Icons.close), + ), + ), + ); + } +} diff --git a/lib/features/settings/presentation/pages/settings_screen.dart b/lib/features/settings/presentation/pages/settings_screen.dart index 0a18843f..865247f7 100644 --- a/lib/features/settings/presentation/pages/settings_screen.dart +++ b/lib/features/settings/presentation/pages/settings_screen.dart @@ -345,7 +345,7 @@ class _SettingsScreenState extends State { return Padding( padding: EdgeInsets.symmetric(horizontal: 16), child: InkWell( - onTap: () {}, + onTap: () => GoRouter.of(context).pushNamed('becomeConsultantScreen'), borderRadius: BorderRadius.circular(20), child: Ink( height: 52,