From 80615ea2e67178f74c3dd51294f4a1be47df8b00 Mon Sep 17 00:00:00 2001 From: Tamara Slosarek Date: Thu, 21 Dec 2023 17:45:45 +0100 Subject: [PATCH] feat(#636, #681): improve delete data dialog (closes #681) --- app/lib/l10n/app_en.arb | 3 ++- app/lib/more/pages/more.dart | 31 ++++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/app/lib/l10n/app_en.arb b/app/lib/l10n/app_en.arb index 990f6014..f1274529 100644 --- a/app/lib/l10n/app_en.arb +++ b/app/lib/l10n/app_en.arb @@ -344,7 +344,8 @@ "settings_page_account_settings": "Settings", "settings_page_delete_data": "Delete app data", "settings_page_delete_data_text": "Are you sure that you want to delete all app data? This also includes your genetic data and will reset the app.", - "settings_page_delete_data_confirmation": "I understand that my genetic data will be deleted and it might not be possible to import it again.", + "settings_page_delete_data_additional_text": "Your genetic data will be deleted and it might not be possible to import it again.", + "settings_page_delete_data_confirmation": "I understand the consequences and want to delete all app data", "settings_page_more": "More", "settings_page_onboarding": "Onboarding", "settings_page_about_us": "About us", diff --git a/app/lib/more/pages/more.dart b/app/lib/more/pages/more.dart index 1dadcda7..2617dc48 100644 --- a/app/lib/more/pages/more.dart +++ b/app/lib/more/pages/more.dart @@ -82,13 +82,30 @@ class DeleteDataDialog extends HookWidget { children: [ DialogContentText(context.l10n.settings_page_delete_data_text), SizedBox(height: PharMeTheme.mediumSpace), - CheckboxListTileWrapper( - isChecked: agreedToDeletion.value, - onChanged: (value) => agreedToDeletion.value = value - ?? agreedToDeletion.value, - title: context.l10n.settings_page_delete_data_confirmation, - controlAffinity: ListTileControlAffinity.leading, - contentPadding: EdgeInsets.zero, + DialogContentText( + context.l10n.settings_page_delete_data_additional_text, + ), + SizedBox(height: PharMeTheme.mediumSpace), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + width: PharMeTheme.mediumToLargeSpace, + height: PharMeTheme.mediumToLargeSpace, + child: Checkbox.adaptive( + value: agreedToDeletion.value, + onChanged: (value) => + agreedToDeletion.value = value ?? agreedToDeletion.value, + ), + ), + SizedBox(width: PharMeTheme.smallSpace), + Expanded( + child: DialogContentText( + context.l10n.settings_page_delete_data_confirmation, + ), + ), + ], ), ], ),