forked from eatvio/eatvio_app
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef4d91a5d8 | ||
|
|
cfbd7597fa | ||
|
|
412ac0aeeb |
@@ -73,10 +73,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AppRouter.navigatorKey.currentContext?.go(
|
AppRouter.navigatorKey.currentContext?.go('/feed-screen', extra: {'needToInitializeWebSocket': false});
|
||||||
'/feed-screen',
|
|
||||||
extra: {'needToInitializeWebSocket': false},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -102,11 +99,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
GoRouter.of(context).pushNamed(DevToolsScreen.name);
|
GoRouter.of(context).pushNamed(DevToolsScreen.name);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(ImageConstant.imgLogoEatvio, height: isFocused ? 64 : MediaQuery.of(context).size.width - 64, fit: BoxFit.contain),
|
||||||
ImageConstant.imgLogoEatvio,
|
|
||||||
height: isFocused ? 64 : MediaQuery.of(context).size.width - 64,
|
|
||||||
fit: BoxFit.contain,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
@@ -137,10 +130,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
hidePassword = !hidePassword;
|
hidePassword = !hidePassword;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(hidePassword ? Icons.visibility_outlined : Icons.visibility_off_outlined, color: Colors.grey),
|
||||||
hidePassword ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
@@ -149,11 +139,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
onTap: () => GoRouter.of(context).goNamed('forgetPasswordScreen', extra: false),
|
onTap: () => GoRouter.of(context).goNamed('forgetPasswordScreen', extra: false),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Забыли пароль?',
|
'Забыли пароль?',
|
||||||
style: TextStyle(
|
style: TextStyle(color: appTheme.blueA400, decorationColor: appTheme.blueA400, decoration: TextDecoration.underline),
|
||||||
color: appTheme.blueA400,
|
|
||||||
decorationColor: appTheme.blueA400,
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -166,11 +152,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
onTap: () => GoRouter.of(context).goNamed('registrationScreen'),
|
onTap: () => GoRouter.of(context).goNamed('registrationScreen'),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Зарегистрироваться',
|
'Зарегистрироваться',
|
||||||
style: TextStyle(
|
style: TextStyle(color: appTheme.blueA400, decorationColor: appTheme.blueA400, decoration: TextDecoration.underline),
|
||||||
color: appTheme.blueA400,
|
|
||||||
decorationColor: appTheme.blueA400,
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -181,23 +163,22 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: 'Нажимая "Войти" или "Зарегистрироваться", Вы соглашаетесь \n',
|
text: 'Нажимая "Войти" или "Зарегистрироваться", Вы соглашаетесь \n',
|
||||||
style: const TextStyle(
|
style: const TextStyle(fontSize: 12, color: Colors.black),
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
children: [
|
children: [
|
||||||
const TextSpan(text: 'c '),
|
const TextSpan(text: 'c '),
|
||||||
TextSpan(
|
if (!hidePlans) ...[
|
||||||
text: ' Публичной офертой',
|
TextSpan(
|
||||||
style: TextStyle(
|
text: ' Публичной офертой',
|
||||||
fontSize: 12,
|
style: TextStyle(
|
||||||
color: appTheme.blueA400,
|
fontSize: 12,
|
||||||
decorationColor: appTheme.blueA400,
|
color: appTheme.blueA400,
|
||||||
decoration: TextDecoration.underline,
|
decorationColor: appTheme.blueA400,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
),
|
||||||
|
recognizer: TapGestureRecognizer()..onTap = () async => await launchUrl(Uri.parse('$baseUrl/oferta_bs.pdf')),
|
||||||
),
|
),
|
||||||
recognizer: TapGestureRecognizer()..onTap = () async => await launchUrl(Uri.parse('$baseUrl/oferta_bs.pdf')),
|
const TextSpan(text: ' и '),
|
||||||
),
|
],
|
||||||
const TextSpan(text: ' и '),
|
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: 'Политикой конфиденциальности\nи защитой персональных данных',
|
text: 'Политикой конфиденциальности\nи защитой персональных данных',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -223,17 +204,12 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
highlightElevation: 0,
|
highlightElevation: 0,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
focusElevation: 0,
|
focusElevation: 0,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||||
borderRadius: BorderRadius.circular(20),
|
|
||||||
),
|
|
||||||
backgroundColor: state is AuthStateLoading ? Colors.black.withAlpha(50) : appTheme.blueA400,
|
backgroundColor: state is AuthStateLoading ? Colors.black.withAlpha(50) : appTheme.blueA400,
|
||||||
onPressed: state is AuthStateLoading
|
onPressed: state is AuthStateLoading
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
final isAuthenticated = await authCubit.getTokenByCredentials(
|
final isAuthenticated = await authCubit.getTokenByCredentials(emailController.text, passwordController.text);
|
||||||
emailController.text,
|
|
||||||
passwordController.text,
|
|
||||||
);
|
|
||||||
if (isAuthenticated) {
|
if (isAuthenticated) {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
_reconnectWebSocket(context);
|
_reconnectWebSocket(context);
|
||||||
@@ -242,10 +218,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
},
|
},
|
||||||
label: state is AuthStateLoading
|
label: state is AuthStateLoading
|
||||||
? const CupertinoActivityIndicator()
|
? const CupertinoActivityIndicator()
|
||||||
: Text(
|
: Text('Войти', style: theme.textTheme.titleSmall!.copyWith(color: Colors.white)),
|
||||||
'Войти',
|
|
||||||
style: theme.textTheme.titleSmall!.copyWith(color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
@@ -257,9 +230,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
highlightElevation: 0,
|
highlightElevation: 0,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
focusElevation: 0,
|
focusElevation: 0,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
),
|
|
||||||
backgroundColor: state is AuthStateLoading ? Colors.black.withAlpha(50) : appTheme.blueA400,
|
backgroundColor: state is AuthStateLoading ? Colors.black.withAlpha(50) : appTheme.blueA400,
|
||||||
onPressed: state is AuthStateLoading
|
onPressed: state is AuthStateLoading
|
||||||
? null
|
? null
|
||||||
@@ -274,14 +245,10 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text('Где взять QR-код?\n', style: TextStyle(fontSize: 18)),
|
||||||
'Где взять QR-код?\n',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
'1. Войдите на сайте $baseUrl в свой аккаунт\n\n2. Перейдите в настройки профиля\n\n3. В разделе "Доп информация" перейдите на "QR Login"'),
|
'1. Войдите на сайте $baseUrl в свой аккаунт\n\n2. Перейдите в настройки профиля\n\n3. В разделе "Доп информация" перейдите на "QR Login"',
|
||||||
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
@@ -293,15 +260,10 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
},
|
},
|
||||||
child: Ink(
|
child: Ink(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)),
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
),
|
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Отмена',
|
'Отмена',
|
||||||
style: TextStyle(
|
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400),
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -314,15 +276,10 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
},
|
},
|
||||||
child: Ink(
|
child: Ink(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)),
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'Перейти',
|
'Перейти',
|
||||||
style: TextStyle(
|
style: TextStyle(color: appTheme.blueA400, fontWeight: FontWeight.w600),
|
||||||
color: appTheme.blueA400,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -337,10 +294,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||||||
},
|
},
|
||||||
label: state is AuthStateLoading
|
label: state is AuthStateLoading
|
||||||
? const CupertinoActivityIndicator()
|
? const CupertinoActivityIndicator()
|
||||||
: const Icon(
|
: const Icon(Icons.qr_code_scanner_rounded, color: Colors.white),
|
||||||
Icons.qr_code_scanner_rounded,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -25,24 +25,16 @@ class _LastStepScreenState extends State<LastStepScreen> {
|
|||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
child: Text(
|
child: Text('Последний шаг', style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, height: 1.1)),
|
||||||
'Последний шаг',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 24,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
height: 1.1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
CheckboxListTile(
|
CheckboxListTile(
|
||||||
value: checkboxState,
|
value: checkboxState,
|
||||||
title: const Text(
|
title: Text(
|
||||||
'Я ознакомлен и принимаю договор публичной офёрты',
|
hidePlans
|
||||||
style: TextStyle(
|
? 'Я ознакомлен и принимаю политику конфиденциальности и защиту персональных данных'
|
||||||
fontSize: 18,
|
: 'Я ознакомлен и принимаю договор публичной офёрты',
|
||||||
height: 1,
|
style: const TextStyle(fontSize: 18, height: 1),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
onChanged: (_) {
|
onChanged: (_) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -53,25 +45,14 @@ class _LastStepScreenState extends State<LastStepScreen> {
|
|||||||
activeColor: appTheme.blueA400,
|
activeColor: appTheme.blueA400,
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16),
|
contentPadding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16), child: _divider(context)),
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 16,
|
|
||||||
vertical: 16,
|
|
||||||
),
|
|
||||||
child: _divider(context),
|
|
||||||
),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () async => await launchUrl(Uri.parse('$baseUrl/oferta_bs.pdf')),
|
onPressed: () async => await launchUrl(Uri.parse(hidePlans ? '$baseUrl/docs/privacy.pdf' : '$baseUrl/oferta_bs.pdf')),
|
||||||
child: const Text(
|
child: Text(
|
||||||
'Договор офёрты',
|
hidePlans ? 'Политика конфиденциальности и пользовательское соглашение' : 'Договор офёрты',
|
||||||
style: TextStyle(
|
style: const TextStyle(height: 1, fontSize: 16, color: Color(0xFF323F4B), decoration: TextDecoration.underline),
|
||||||
height: 1,
|
|
||||||
fontSize: 16,
|
|
||||||
color: Color(0xFF323F4B),
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -84,10 +65,7 @@ class _LastStepScreenState extends State<LastStepScreen> {
|
|||||||
return Container(
|
return Container(
|
||||||
height: 0.4,
|
height: 0.4,
|
||||||
width: MediaQuery.of(context).size.width - 32,
|
width: MediaQuery.of(context).size.width - 32,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(color: Colors.black26, borderRadius: BorderRadius.circular(16)),
|
||||||
color: Colors.black26,
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class ConsultationService {
|
|||||||
else if (state != null && stateComparison != null)
|
else if (state != null && stateComparison != null)
|
||||||
'filters[last_state][${stateComparison.value}]': state,
|
'filters[last_state][${stateComparison.value}]': state,
|
||||||
if (dateComparison != null && date != null) 'filters[start_date][${dateComparison.value}]': date,
|
if (dateComparison != null && date != null) 'filters[start_date][${dateComparison.value}]': date,
|
||||||
|
'sort[]': 'created_at:desc',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
return ConsultationPaginationModel.fromJson(response.data);
|
return ConsultationPaginationModel.fromJson(response.data);
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ class ConsultationsArchiveCubit extends Cubit<ConsultationsArchiveState> {
|
|||||||
dateComparison: state.periodFilterStatus == PeriodFilterStatus.all ? null : FiltersComparisonEnum.greaterThanOrEqual,
|
dateComparison: state.periodFilterStatus == PeriodFilterStatus.all ? null : FiltersComparisonEnum.greaterThanOrEqual,
|
||||||
stateComparison: state.consultationFilterStatus == ConsultationFilterStatus.all
|
stateComparison: state.consultationFilterStatus == ConsultationFilterStatus.all
|
||||||
? null
|
? null
|
||||||
: state.consultationFilterStatus == ConsultationFilterStatus.inProgress
|
: FiltersComparisonEnum.equal,
|
||||||
? FiltersComparisonEnum.notInArray
|
|
||||||
: FiltersComparisonEnum.equal,
|
|
||||||
);
|
);
|
||||||
emit(state.copyWith(consultations: consultations, isLoading: false));
|
emit(state.copyWith(consultations: consultations, isLoading: false));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -67,20 +65,17 @@ class ConsultationsArchiveCubit extends Cubit<ConsultationsArchiveState> {
|
|||||||
enum ConsultationFilterStatus {
|
enum ConsultationFilterStatus {
|
||||||
all,
|
all,
|
||||||
canceled,
|
canceled,
|
||||||
finished,
|
finished;
|
||||||
inProgress;
|
|
||||||
|
|
||||||
String get name => switch (this) {
|
String get name => switch (this) {
|
||||||
ConsultationFilterStatus.all => 'Все консультации',
|
ConsultationFilterStatus.all => 'Все консультации',
|
||||||
ConsultationFilterStatus.canceled => 'Отменён',
|
ConsultationFilterStatus.canceled => 'Отменён',
|
||||||
ConsultationFilterStatus.finished => 'Завершён',
|
ConsultationFilterStatus.finished => 'Завершён',
|
||||||
ConsultationFilterStatus.inProgress => 'В процессе',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
String? get value => switch (this) {
|
String? get value => switch (this) {
|
||||||
ConsultationFilterStatus.all => null,
|
ConsultationFilterStatus.all => null,
|
||||||
ConsultationFilterStatus.canceled => 'canceled_by_the_initiator',
|
ConsultationFilterStatus.canceled => 'canceled_by_the_initiator',
|
||||||
ConsultationFilterStatus.finished => 'charge_was_collected',
|
ConsultationFilterStatus.finished => 'charge_was_collected',
|
||||||
ConsultationFilterStatus.inProgress => 'active',
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ class _ConsultationsArchiveScreenState extends State<ConsultationsArchiveScreen>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
state.consultations[index].startDate.format('yyyy.MM.dd'),
|
state.consultations[index].startDate.format('dd.MM.yy'),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Color(0xFF6D6F71),
|
color: Color(0xFF6D6F71),
|
||||||
height: 1,
|
height: 1,
|
||||||
|
|||||||
@@ -51,9 +51,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
builder: (BuildContext context, SettingsState state) {
|
builder: (BuildContext context, SettingsState state) {
|
||||||
if (state is SettingsStateLoaded) {
|
if (state is SettingsStateLoaded) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(title: const Text('Настройки')),
|
||||||
title: const Text('Настройки'),
|
|
||||||
),
|
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
@@ -64,8 +62,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_notifications(state),
|
_notifications(state),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_aboutEatvio(state),
|
if (!hidePlans) ...[_aboutEatvio(state), const SizedBox(height: 12)],
|
||||||
const SizedBox(height: 12),
|
|
||||||
_becomeConsultantButton(state),
|
_becomeConsultantButton(state),
|
||||||
_deleteAccountButton(state, settingsCubit),
|
_deleteAccountButton(state, settingsCubit),
|
||||||
],
|
],
|
||||||
@@ -76,16 +73,12 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
}
|
}
|
||||||
if (state is SettingsStateError) {
|
if (state is SettingsStateError) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(title: const Text('Настройки')),
|
||||||
title: const Text('Настройки'),
|
|
||||||
),
|
|
||||||
body: DataErrorWidget(onReload: () => settingsCubit.init()),
|
body: DataErrorWidget(onReload: () => settingsCubit.init()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(title: const Text('Настройки')),
|
||||||
title: const Text('Настройки'),
|
|
||||||
),
|
|
||||||
body: const Loader(),
|
body: const Loader(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -101,22 +94,13 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Дополнительаная информация',
|
'Дополнительаная информация',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 16, height: 1, color: Colors.grey, fontFamily: 'Mulish'),
|
||||||
fontSize: 16,
|
|
||||||
height: 1,
|
|
||||||
color: Colors.grey,
|
|
||||||
fontFamily: 'Mulish',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_tile(
|
_tile(
|
||||||
onTap: () => GoRouter.of(context).pushNamed(
|
onTap: () => GoRouter.of(context).pushNamed(
|
||||||
'generalInfoScreen',
|
'generalInfoScreen',
|
||||||
extra: SettingsEntity(
|
extra: SettingsEntity(profileSettingsModel: state.profileSettings, profileDetailsModel: state.profileDetails, settingsCubit: settingsCubit),
|
||||||
profileSettingsModel: state.profileSettings,
|
|
||||||
profileDetailsModel: state.profileDetails,
|
|
||||||
settingsCubit: settingsCubit,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
title: 'Общая информация',
|
title: 'Общая информация',
|
||||||
),
|
),
|
||||||
@@ -124,11 +108,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
_tile(
|
_tile(
|
||||||
onTap: () => GoRouter.of(context).pushNamed(
|
onTap: () => GoRouter.of(context).pushNamed(
|
||||||
'physicalFormScreen',
|
'physicalFormScreen',
|
||||||
extra: SettingsEntity(
|
extra: SettingsEntity(profileSettingsModel: state.profileSettings, profileDetailsModel: state.profileDetails, settingsCubit: settingsCubit),
|
||||||
profileSettingsModel: state.profileSettings,
|
|
||||||
profileDetailsModel: state.profileDetails,
|
|
||||||
settingsCubit: settingsCubit,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
title: 'Физическая форма',
|
title: 'Физическая форма',
|
||||||
),
|
),
|
||||||
@@ -136,11 +116,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
_tile(
|
_tile(
|
||||||
onTap: () => GoRouter.of(context).pushNamed(
|
onTap: () => GoRouter.of(context).pushNamed(
|
||||||
'pressureScreen',
|
'pressureScreen',
|
||||||
extra: SettingsEntity(
|
extra: SettingsEntity(profileSettingsModel: state.profileSettings, profileDetailsModel: state.profileDetails, settingsCubit: settingsCubit),
|
||||||
profileSettingsModel: state.profileSettings,
|
|
||||||
profileDetailsModel: state.profileDetails,
|
|
||||||
settingsCubit: settingsCubit,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
title: 'Давление',
|
title: 'Давление',
|
||||||
),
|
),
|
||||||
@@ -148,11 +124,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
_tile(
|
_tile(
|
||||||
onTap: () => GoRouter.of(context).pushNamed(
|
onTap: () => GoRouter.of(context).pushNamed(
|
||||||
'otherInfoScreen',
|
'otherInfoScreen',
|
||||||
extra: SettingsEntity(
|
extra: SettingsEntity(profileSettingsModel: state.profileSettings, profileDetailsModel: state.profileDetails, settingsCubit: settingsCubit),
|
||||||
profileSettingsModel: state.profileSettings,
|
|
||||||
profileDetailsModel: state.profileDetails,
|
|
||||||
settingsCubit: settingsCubit,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
title: 'Прочая информация',
|
title: 'Прочая информация',
|
||||||
),
|
),
|
||||||
@@ -160,31 +132,17 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
_tile(
|
_tile(
|
||||||
onTap: () => GoRouter.of(context).pushNamed(
|
onTap: () => GoRouter.of(context).pushNamed(
|
||||||
'physicalActivityScreen',
|
'physicalActivityScreen',
|
||||||
extra: SettingsEntity(
|
extra: SettingsEntity(profileSettingsModel: state.profileSettings, profileDetailsModel: state.profileDetails, settingsCubit: settingsCubit),
|
||||||
profileSettingsModel: state.profileSettings,
|
|
||||||
profileDetailsModel: state.profileDetails,
|
|
||||||
settingsCubit: settingsCubit,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
title: 'Физическая нагрузка',
|
title: 'Физическая нагрузка',
|
||||||
),
|
),
|
||||||
_divider(context),
|
_divider(context),
|
||||||
_tile(
|
_tile(onTap: () => GoRouter.of(context).pushNamed('forgetPasswordScreen', extra: true), title: 'Сменить пароль'),
|
||||||
onTap: () => GoRouter.of(context).pushNamed(
|
|
||||||
'forgetPasswordScreen',
|
|
||||||
extra: true,
|
|
||||||
),
|
|
||||||
title: 'Сменить пароль',
|
|
||||||
),
|
|
||||||
_divider(context),
|
_divider(context),
|
||||||
_tile(
|
_tile(
|
||||||
onTap: () => GoRouter.of(context).pushNamed(
|
onTap: () => GoRouter.of(context).pushNamed(
|
||||||
'changeEmailScreen',
|
'changeEmailScreen',
|
||||||
extra: SettingsEntity(
|
extra: SettingsEntity(profileSettingsModel: state.profileSettings, profileDetailsModel: state.profileDetails, settingsCubit: settingsCubit),
|
||||||
profileSettingsModel: state.profileSettings,
|
|
||||||
profileDetailsModel: state.profileDetails,
|
|
||||||
settingsCubit: settingsCubit,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
title: 'Сменить Email',
|
title: 'Сменить Email',
|
||||||
),
|
),
|
||||||
@@ -198,14 +156,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
child: Text(
|
child: Text('Уведомления', style: TextStyle(fontSize: 16, height: 1, color: Colors.grey)),
|
||||||
'Уведомления',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
height: 1,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
_tile(
|
_tile(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
@@ -213,11 +164,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
updatesNotificationsSwitchState = !updatesNotificationsSwitchState;
|
updatesNotificationsSwitchState = !updatesNotificationsSwitchState;
|
||||||
});
|
});
|
||||||
settingsCubit.updateProfileSettings(
|
settingsCubit.updateProfileSettings(profileSettingsModel: state.profileSettings.copyWith(newUpdatesNotifications: updatesNotificationsSwitchState));
|
||||||
profileSettingsModel: state.profileSettings.copyWith(
|
|
||||||
newUpdatesNotifications: updatesNotificationsSwitchState,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
title: 'Уведомление о новых обновлениях',
|
title: 'Уведомление о новых обновлениях',
|
||||||
trailing: CupertinoSwitch(
|
trailing: CupertinoSwitch(
|
||||||
@@ -228,9 +175,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
updatesNotificationsSwitchState = newValue;
|
updatesNotificationsSwitchState = newValue;
|
||||||
});
|
});
|
||||||
settingsCubit.updateProfileSettings(
|
settingsCubit.updateProfileSettings(
|
||||||
profileSettingsModel: state.profileSettings.copyWith(
|
profileSettingsModel: state.profileSettings.copyWith(newUpdatesNotifications: updatesNotificationsSwitchState),
|
||||||
newUpdatesNotifications: updatesNotificationsSwitchState,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -243,9 +188,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
fillDiaryNotificationsSwitchState = !fillDiaryNotificationsSwitchState;
|
fillDiaryNotificationsSwitchState = !fillDiaryNotificationsSwitchState;
|
||||||
});
|
});
|
||||||
settingsCubit.updateProfileSettings(
|
settingsCubit.updateProfileSettings(
|
||||||
profileSettingsModel: state.profileSettings.copyWith(
|
profileSettingsModel: state.profileSettings.copyWith(diaryReminderNotifications: fillDiaryNotificationsSwitchState),
|
||||||
diaryReminderNotifications: fillDiaryNotificationsSwitchState,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
title: 'Напоминание о заполнении дневника',
|
title: 'Напоминание о заполнении дневника',
|
||||||
@@ -257,9 +200,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
fillDiaryNotificationsSwitchState = newValue;
|
fillDiaryNotificationsSwitchState = newValue;
|
||||||
});
|
});
|
||||||
settingsCubit.updateProfileSettings(
|
settingsCubit.updateProfileSettings(
|
||||||
profileSettingsModel: state.profileSettings.copyWith(
|
profileSettingsModel: state.profileSettings.copyWith(diaryReminderNotifications: fillDiaryNotificationsSwitchState),
|
||||||
diaryReminderNotifications: fillDiaryNotificationsSwitchState,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -271,11 +212,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
moodSwitchState = !moodSwitchState;
|
moodSwitchState = !moodSwitchState;
|
||||||
});
|
});
|
||||||
settingsCubit.updateProfileSettings(
|
settingsCubit.updateProfileSettings(profileSettingsModel: state.profileSettings.copyWith(isMoodFillable: moodSwitchState));
|
||||||
profileSettingsModel: state.profileSettings.copyWith(
|
|
||||||
isMoodFillable: moodSwitchState,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
title: 'Указывать “настроение” в заполнение дневника',
|
title: 'Указывать “настроение” в заполнение дневника',
|
||||||
trailing: CupertinoSwitch(
|
trailing: CupertinoSwitch(
|
||||||
@@ -285,11 +222,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
moodSwitchState = newValue;
|
moodSwitchState = newValue;
|
||||||
});
|
});
|
||||||
settingsCubit.updateProfileSettings(
|
settingsCubit.updateProfileSettings(profileSettingsModel: state.profileSettings.copyWith(isMoodFillable: moodSwitchState));
|
||||||
profileSettingsModel: state.profileSettings.copyWith(
|
|
||||||
isMoodFillable: moodSwitchState,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -300,11 +233,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
bedTimeSwitchState = !bedTimeSwitchState;
|
bedTimeSwitchState = !bedTimeSwitchState;
|
||||||
});
|
});
|
||||||
settingsCubit.updateProfileSettings(
|
settingsCubit.updateProfileSettings(profileSettingsModel: state.profileSettings.copyWith(isBedtimeFillable: bedTimeSwitchState));
|
||||||
profileSettingsModel: state.profileSettings.copyWith(
|
|
||||||
isBedtimeFillable: bedTimeSwitchState,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
title: 'Указывать “отход ко сну” в заполнение дневника',
|
title: 'Указывать “отход ко сну” в заполнение дневника',
|
||||||
trailing: CupertinoSwitch(
|
trailing: CupertinoSwitch(
|
||||||
@@ -314,11 +243,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
bedTimeSwitchState = newValue;
|
bedTimeSwitchState = newValue;
|
||||||
});
|
});
|
||||||
settingsCubit.updateProfileSettings(
|
settingsCubit.updateProfileSettings(profileSettingsModel: state.profileSettings.copyWith(isBedtimeFillable: bedTimeSwitchState));
|
||||||
profileSettingsModel: state.profileSettings.copyWith(
|
|
||||||
isBedtimeFillable: bedTimeSwitchState,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -332,24 +257,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
child: Text(
|
child: Text('О Eatvio', style: TextStyle(fontSize: 16, height: 1, color: Colors.grey)),
|
||||||
'О Eatvio',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
height: 1,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
_tile(
|
|
||||||
title: 'О компании',
|
|
||||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/ru/company-details')),
|
|
||||||
),
|
),
|
||||||
|
_tile(title: 'О компании', onTap: () async => await launchUrl(Uri.parse('$baseUrl/ru/company-details'))),
|
||||||
_divider(context),
|
_divider(context),
|
||||||
_tile(
|
_tile(title: 'Пользовательское соглашение', onTap: () async => await launchUrl(Uri.parse('$baseUrl/oferta_bs.pdf'))),
|
||||||
title: 'Пользовательское соглашение',
|
|
||||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/oferta_bs.pdf')),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -364,19 +276,9 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
child: Ink(
|
child: Ink(
|
||||||
height: 52,
|
height: 52,
|
||||||
width: MediaQuery.of(context).size.width - 16,
|
width: MediaQuery.of(context).size.width - 16,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: appTheme.blueA400),
|
||||||
borderRadius: BorderRadius.circular(20),
|
|
||||||
color: appTheme.blueA400,
|
|
||||||
),
|
|
||||||
child: const Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text('Стать консультантом', style: TextStyle(color: Colors.white, height: 1, fontSize: 18)),
|
||||||
'Стать консультантом',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
height: 1,
|
|
||||||
fontSize: 18,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -388,19 +290,9 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
child: Ink(
|
child: Ink(
|
||||||
height: 52,
|
height: 52,
|
||||||
width: MediaQuery.of(context).size.width - 16,
|
width: MediaQuery.of(context).size.width - 16,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: const Color(0xFFEAEAEA)),
|
||||||
borderRadius: BorderRadius.circular(20),
|
|
||||||
color: const Color(0xFFEAEAEA),
|
|
||||||
),
|
|
||||||
child: const Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text('Данные на проверке', style: TextStyle(color: Colors.black, height: 1, fontSize: 18)),
|
||||||
'Данные на проверке',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
height: 1,
|
|
||||||
fontSize: 18,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -413,19 +305,9 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
child: Ink(
|
child: Ink(
|
||||||
height: 52,
|
height: 52,
|
||||||
width: MediaQuery.of(context).size.width - 16,
|
width: MediaQuery.of(context).size.width - 16,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: const Color(0x33FFCC00)),
|
||||||
borderRadius: BorderRadius.circular(20),
|
|
||||||
color: const Color(0x33FFCC00),
|
|
||||||
),
|
|
||||||
child: const Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text('Заявка обработана', style: TextStyle(color: Colors.black, height: 1, fontSize: 18)),
|
||||||
'Заявка обработана',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
height: 1,
|
|
||||||
fontSize: 18,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -444,57 +326,28 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
userRootNavigator: true,
|
userRootNavigator: true,
|
||||||
context: context,
|
context: context,
|
||||||
height: null,
|
height: null,
|
||||||
child: DeleteAccountBottomSheet(
|
child: DeleteAccountBottomSheet(cubit: settingsCubit),
|
||||||
cubit: settingsCubit,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
child: Ink(
|
child: Ink(
|
||||||
height: 52,
|
height: 52,
|
||||||
width: MediaQuery.of(context).size.width - 16,
|
width: MediaQuery.of(context).size.width - 16,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: const Color(0xFFEAEAEA)),
|
||||||
borderRadius: BorderRadius.circular(20),
|
|
||||||
color: const Color(0xFFEAEAEA),
|
|
||||||
),
|
|
||||||
child: const Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text('Удалить аккаунт', style: TextStyle(color: Colors.black, height: 1, fontSize: 18)),
|
||||||
'Удалить аккаунт',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
height: 1,
|
|
||||||
fontSize: 18,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ListTile _tile({
|
ListTile _tile({required String title, required Function() onTap, Widget? trailing, EdgeInsets? padding}) {
|
||||||
required String title,
|
|
||||||
required Function() onTap,
|
|
||||||
Widget? trailing,
|
|
||||||
EdgeInsets? padding,
|
|
||||||
}) {
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
contentPadding: padding,
|
contentPadding: padding,
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
title: Text(
|
title: Text(title, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500, height: 1)),
|
||||||
title,
|
trailing: trailing ?? const Icon(Icons.arrow_forward_ios_rounded, size: 12, color: Colors.black38),
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
height: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
trailing: trailing ??
|
|
||||||
const Icon(
|
|
||||||
Icons.arrow_forward_ios_rounded,
|
|
||||||
size: 12,
|
|
||||||
color: Colors.black38,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -503,10 +356,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
child: Container(
|
child: Container(
|
||||||
height: 0.4,
|
height: 0.4,
|
||||||
width: MediaQuery.of(context).size.width - 32,
|
width: MediaQuery.of(context).size.width - 32,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(color: Colors.black26, borderRadius: BorderRadius.circular(16)),
|
||||||
color: Colors.black26,
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -530,33 +380,23 @@ class _DeleteAccountBottomSheet extends State<DeleteAccountBottomSheet> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
const SizedBox(height: 8),
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
const BottomSheetHandlerBar(),
|
const BottomSheetHandlerBar(),
|
||||||
const SizedBox(
|
const SizedBox(height: 20),
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
Text(s.accountDeleting, style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black)),
|
Text(s.accountDeleting, style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black)),
|
||||||
const SizedBox(
|
const SizedBox(height: 16),
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
s.youShureYouWantToDeleteAccount,
|
s.youShureYouWantToDeleteAccount,
|
||||||
style: TextStyles.textSMedium.copyWith(color: appTheme.black),
|
style: TextStyles.textSMedium.copyWith(color: appTheme.black),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(height: 8),
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
s.itCantBeRecovered,
|
s.itCantBeRecovered,
|
||||||
style: TextStyles.textSMedium.copyWith(color: appTheme.black),
|
style: TextStyles.textSMedium.copyWith(color: appTheme.black),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(height: 8),
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
CustomOutlinedButton(
|
CustomOutlinedButton(
|
||||||
text: s.delete,
|
text: s.delete,
|
||||||
height: 52,
|
height: 52,
|
||||||
@@ -573,9 +413,7 @@ class _DeleteAccountBottomSheet extends State<DeleteAccountBottomSheet> {
|
|||||||
showErrorDialog(context, description: s.cannotDeleteAccount);
|
showErrorDialog(context, description: s.cannotDeleteAccount);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(height: 40),
|
||||||
height: 40,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -69,24 +69,17 @@ class SupportScreen extends StatelessWidget {
|
|||||||
child: Text('Правовые документы', style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500)),
|
child: Text('Правовые документы', style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500)),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
InkWell(
|
if (!hidePlans) ...[
|
||||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/public_offer.pdf')),
|
InkWell(
|
||||||
borderRadius: BorderRadius.circular(16),
|
onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/privacy.pdf')),
|
||||||
child: const Padding(
|
borderRadius: BorderRadius.circular(16),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
child: const Padding(
|
||||||
child: Text('Публичная офёрта', style: TextStyle(fontSize: 16)),
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||||||
|
child: Text('Политика конфиденциальности', style: TextStyle(fontSize: 16)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 8),
|
||||||
const SizedBox(height: 8),
|
],
|
||||||
InkWell(
|
|
||||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/privacy.pdf')),
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
child: const Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
|
||||||
child: Text('Политика конфиденциальности', style: TextStyle(fontSize: 16)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/company-details')),
|
onTap: () async => await launchUrl(Uri.parse('$baseUrl/company-details')),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
|||||||
Reference in New Issue
Block a user