diff --git a/lib/screen/app_router.dart b/lib/screen/app_router.dart index 4dec074f9..c783529bb 100644 --- a/lib/screen/app_router.dart +++ b/lib/screen/app_router.dart @@ -94,7 +94,6 @@ import 'package:autonomy_flutter/screen/onboarding/view_address/name_view_only_p import 'package:autonomy_flutter/screen/onboarding/view_address/view_existing_address.dart'; import 'package:autonomy_flutter/screen/onboarding/view_address/view_existing_address_bloc.dart'; import 'package:autonomy_flutter/screen/onboarding_page.dart'; -import 'package:autonomy_flutter/screen/participate_user_test_page.dart'; import 'package:autonomy_flutter/screen/playlists/add_new_playlist/add_new_playlist.dart'; import 'package:autonomy_flutter/screen/playlists/add_to_playlist/add_to_playlist.dart'; import 'package:autonomy_flutter/screen/playlists/edit_playlist/edit_playlist.dart'; @@ -177,7 +176,6 @@ class AppRouter { static const merchOrdersPage = 'merchOrderDetailPage'; static const supportThreadPage = 'supportThreadPage'; static const bugBountyPage = 'bugBountyPage'; - static const participateUserTestPage = 'participateUserTestPage'; static const keySyncPage = 'key_sync_page'; static const githubDocPage = 'github_doc_page'; static const sendArtworkPage = 'send_artwork_page'; @@ -828,12 +826,6 @@ class AppRouter { return CupertinoPageRoute( settings: settings, builder: (context) => const BugBountyPage()); - case participateUserTestPage: - return CupertinoPageRoute( - settings: settings, - builder: (context) => ParticipateUserTestPage( - payload: settings.arguments! as UserTestPayload)); - case hiddenArtworksPage: return CupertinoPageRoute( settings: settings, diff --git a/lib/screen/participate_user_test_page.dart b/lib/screen/participate_user_test_page.dart deleted file mode 100644 index bb2cc7b7e..000000000 --- a/lib/screen/participate_user_test_page.dart +++ /dev/null @@ -1,135 +0,0 @@ -// -// SPDX-License-Identifier: BSD-2-Clause-Patent -// Copyright © 2022 Bitmark. All rights reserved. -// Use of this source code is governed by the BSD-2-Clause Plus Patent License -// that can be found in the LICENSE file. -// -import 'package:autonomy_flutter/screen/app_router.dart'; -import 'package:autonomy_flutter/screen/settings/help_us/inapp_webview.dart'; -import 'package:autonomy_flutter/util/style.dart'; -import 'package:autonomy_flutter/view/back_appbar.dart'; -import 'package:autonomy_flutter/view/primary_button.dart'; -import 'package:autonomy_flutter/view/responsive.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:feralfile_app_theme/feral_file_app_theme.dart'; -import 'package:flutter/material.dart'; - -class ParticipateUserTestPage extends StatelessWidget { - const ParticipateUserTestPage({required this.payload, super.key}); - - final UserTestPayload payload; - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - return Scaffold( - appBar: getBackAppBar( - context, - title: 'user_test'.tr(), - onBack: () => Navigator.of(context).pop(), - ), - body: Container( - margin: ResponsiveLayout.pageEdgeInsetsWithSubmitButton, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - addTitleSpace(), - Text( - 'like_to_test'.tr(), - style: theme.textTheme.ppMori700Black24, - ), - const SizedBox( - height: 32, - ), - Text( - 'help_us_verify'.tr(), - style: theme.textTheme.ppMori400Black16, - ), - const SizedBox( - height: 32, - ), - Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: AppColor.feralFileHighlight, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'what_to_expect'.tr(), - style: theme.textTheme.ppMori700Black14, - ), - const SizedBox(height: 12), - ...[ - 'user_test_will_1'.tr(), - 'user_test_will_2'.tr(), - 'user_test_will_3'.tr(), - 'user_test_will_4'.tr(), - 'user_test_will_5'.tr(), - ].map( - (e) => Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox( - width: 8, - ), - Text( - ' • ', - style: ResponsiveLayout.isMobile - ? theme.textTheme.ppMori400Black14 - : theme.textTheme.ppMori400Black16, - textAlign: TextAlign.start, - ), - Expanded( - child: Text( - e, - style: ResponsiveLayout.isMobile - ? theme.textTheme.ppMori400Black14 - : theme.textTheme.ppMori400Black16, - ), - ), - ], - ), - ), - ], - ), - ), - ], - ), - ), - ), - Row( - children: [ - Expanded( - child: PrimaryButton( - text: 'schedule_test'.tr(), - onTap: () async { - await Navigator.of(context).pushNamed( - AppRouter.inappWebviewPage, - arguments: InAppWebViewPayload(payload.calendarLink), - ); - }, - ), - ), - ], - ), - ], - ), - ), - ); - } -} - -class UserTestPayload { - final String calendarLink; - - UserTestPayload(this.calendarLink); -} diff --git a/lib/screen/settings/help_us/help_us_page.dart b/lib/screen/settings/help_us/help_us_page.dart index bf87cfc49..27698138e 100644 --- a/lib/screen/settings/help_us/help_us_page.dart +++ b/lib/screen/settings/help_us/help_us_page.dart @@ -5,13 +5,7 @@ // that can be found in the LICENSE file. // -import 'dart:async'; -import 'dart:convert'; - -import 'package:autonomy_flutter/common/injector.dart'; -import 'package:autonomy_flutter/gateway/pubdoc_api.dart'; import 'package:autonomy_flutter/screen/app_router.dart'; -import 'package:autonomy_flutter/screen/participate_user_test_page.dart'; import 'package:autonomy_flutter/util/style.dart'; import 'package:autonomy_flutter/view/back_appbar.dart'; import 'package:autonomy_flutter/view/responsive.dart'; @@ -28,20 +22,9 @@ class HelpUsPage extends StatefulWidget { } class _HelpUsPageState extends State { - String? _calendarLink; - @override void initState() { super.initState(); - unawaited(_getCalendarLink()); - } - - Future _getCalendarLink() async { - final data = await injector().getUserTestConfigs(); - final configs = jsonDecode(data) as Map; - setState(() { - _calendarLink = configs['calendar_link']; - }); } @override @@ -65,17 +48,6 @@ class _HelpUsPageState extends State { onTap: () async => Navigator.of(context) .pushNamed(AppRouter.bugBountyPage)), ), - addOnlyDivider(), - if (_calendarLink != null && _calendarLink!.isNotEmpty) - Padding( - padding: padding, - child: TappableForwardRow( - leftWidget: Text('p_user_test'.tr(), - style: theme.textTheme.ppMori400Black16), - onTap: () async => Navigator.of(context).pushNamed( - AppRouter.participateUserTestPage, - arguments: UserTestPayload(_calendarLink!))), - ), ] // END HELP US IMPROVE ) diff --git a/lib/screen/settings/settings_page.dart b/lib/screen/settings/settings_page.dart index b544d95c0..bdad7758f 100644 --- a/lib/screen/settings/settings_page.dart +++ b/lib/screen/settings/settings_page.dart @@ -203,7 +203,7 @@ class _SettingsPageState extends State icon: const Icon(AuIcon.help_us), onTap: () async { await Navigator.of(context) - .pushNamed(AppRouter.helpUsPage); + .pushNamed(AppRouter.bugBountyPage); }, ), addOnlyDivider(),