forked from eatvio/eatvio_app
feat: finance consultation
This commit is contained in:
@@ -7,12 +7,18 @@ import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/features/dev_tools/presentation/dev_tools_screen.dart';
|
||||
import 'package:eatvio_app/features/my_diets/presentation/my_diets_screen.dart';
|
||||
import 'package:eatvio_app/features/my_plans/presentation/my_plans_screen.dart';
|
||||
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class MenuScreen extends StatelessWidget {
|
||||
MenuScreen({super.key});
|
||||
final ProfileModel profileModel;
|
||||
|
||||
const MenuScreen({
|
||||
super.key,
|
||||
required this.profileModel,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -29,24 +35,40 @@ class MenuScreen extends StatelessWidget {
|
||||
leading: ImageConstant.icnProfileSettings,
|
||||
onTap: () => GoRouter.of(context).push('/settings-screen'),
|
||||
),
|
||||
if (profileModel.roles.contains('consultant')) _divider(context),
|
||||
if (profileModel.roles.contains('consultant'))
|
||||
_tile(
|
||||
leading: ImageConstant.icnRecipes,
|
||||
title: 'Мои рецепты',
|
||||
onTap: () => GoRouter.of(context).push('/recipe-select-screen'),
|
||||
),
|
||||
if (profileModel.roles.contains('consultant')) _divider(context),
|
||||
if (profileModel.roles.contains('consultant'))
|
||||
_tile(
|
||||
leading: 'assets/icons/diets.svg',
|
||||
title: 'Мои диеты',
|
||||
onTap: () => GoRouter.of(context).push(MyDietsScreen.path),
|
||||
),
|
||||
if (profileModel.roles.contains('consultant')) _divider(context),
|
||||
if (profileModel.roles.contains('consultant'))
|
||||
_tile(
|
||||
leading: ImageConstant.icnPlans,
|
||||
title: 'Мои планы',
|
||||
onTap: () => GoRouter.of(context).push(MyPlansScreen.path),
|
||||
),
|
||||
_divider(context),
|
||||
_tile(
|
||||
leading: ImageConstant.icnRecipes,
|
||||
title: 'Мои рецепты',
|
||||
onTap: () => GoRouter.of(context).push('/recipe-select-screen'),
|
||||
),
|
||||
_divider(context),
|
||||
_tile(
|
||||
leading: 'assets/icons/diets.svg',
|
||||
title: 'Мои диеты',
|
||||
onTap: () => GoRouter.of(context).push(MyDietsScreen.path),
|
||||
),
|
||||
_divider(context),
|
||||
_tile(
|
||||
leading: ImageConstant.icnPlans,
|
||||
title: 'Мои планы',
|
||||
onTap: () => GoRouter.of(context).push(MyPlansScreen.path),
|
||||
),
|
||||
if (profileModel.roles.contains('consultant'))
|
||||
_tile(
|
||||
leading: 'assets/icons/finance.svg',
|
||||
title: 'Мои финансы',
|
||||
onTap: () => GoRouter.of(context).pushNamed('consultantFinanceScreen'),
|
||||
)
|
||||
else
|
||||
_tile(
|
||||
leading: 'assets/icons/finance.svg',
|
||||
title: 'Мои финансы',
|
||||
onTap: () => GoRouter.of(context).pushNamed('userFinanceScreen'),
|
||||
),
|
||||
_divider(context),
|
||||
_tile(
|
||||
leading: 'assets/icons/calendar.svg',
|
||||
|
||||
Reference in New Issue
Block a user