From 18c2419bcc7c61224bd66ffff16ec3bcf2a5b50c Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Jan 2025 14:42:54 +0300 Subject: [PATCH] feat: support --- lib/core/app_router.dart | 6 ++ .../menu/presentation/pages/menu_screen.dart | 2 +- .../presentation/pages/support_screen.dart | 68 +++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 lib/features/support/presentation/pages/support_screen.dart diff --git a/lib/core/app_router.dart b/lib/core/app_router.dart index dd1b63cb..dc4f8c99 100644 --- a/lib/core/app_router.dart +++ b/lib/core/app_router.dart @@ -41,6 +41,7 @@ import 'package:eatvio_app/features/settings/presentation/pages/physical_activit import 'package:eatvio_app/features/settings/presentation/pages/physical_form_screen.dart'; import 'package:eatvio_app/features/settings/presentation/pages/pressure_screen.dart'; import 'package:eatvio_app/features/settings/presentation/pages/settings_screen.dart'; +import 'package:eatvio_app/features/support/presentation/pages/support_screen.dart'; import 'package:eatvio_app/features/user_details/presentation/user_details_screen.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; @@ -252,6 +253,11 @@ class AppRouter { name: 'calendarScreen', builder: (context, state) => CalendarScreen(), ), + GoRoute( + path: '/support-screen', + name: 'supportScreen', + builder: (context, state) => SupportScreen(), + ), GoRoute( path: '/photo-view-screen/:index', name: 'photoViewScreen', diff --git a/lib/features/menu/presentation/pages/menu_screen.dart b/lib/features/menu/presentation/pages/menu_screen.dart index ad974e54..777b8233 100644 --- a/lib/features/menu/presentation/pages/menu_screen.dart +++ b/lib/features/menu/presentation/pages/menu_screen.dart @@ -62,7 +62,7 @@ class MenuScreen extends StatelessWidget { _tile( leading: ImageConstant.icnSupport, title: 'Поддержка', - onTap: () {}, + onTap: () => GoRouter.of(context).push('/support-screen'), ), _divider(context), _tile( diff --git a/lib/features/support/presentation/pages/support_screen.dart b/lib/features/support/presentation/pages/support_screen.dart new file mode 100644 index 00000000..b4f84a00 --- /dev/null +++ b/lib/features/support/presentation/pages/support_screen.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class SupportScreen extends StatelessWidget { + const SupportScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Поддержка'), + ), + body: Column( + children: [ + Padding( + padding: const EdgeInsets.all(16), + child: Text('Если у вас есть вопросы по работе нашего приложения, вы можете задать их, перейдя по ссылке:'), + ), + InkWell( + onTap: () { + launchUrl(Uri.parse('https://t.me/eatvio')); + }, + borderRadius: BorderRadius.circular(16), + child: Ink( + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16), + ), + padding: const EdgeInsets.all(16), + child: Row( + children: [ + SvgPicture.asset( + 'assets/icons/telegram.svg', + colorFilter: ColorFilter.mode(Colors.black, BlendMode.srcIn), + ), + const SizedBox(width: 12), + Text('Telegram'), + ], + ), + ), + ), + const SizedBox(height: 8), + InkWell( + onTap: () { + launchUrl(Uri.parse('mailto:help@eatv.io')); + }, + borderRadius: BorderRadius.circular(16), + child: Ink( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16), + ), + width: double.infinity, + padding: const EdgeInsets.all(16), + child: Row( + children: [ + Icon(Icons.alternate_email_rounded), + const SizedBox(width: 12), + Text('E-mail'), + ], + ), + ), + ), + ], + ), + ); + } +}