Browse Source

Changed context paramter in showNewChoiceDialog from required named parameter to required positional parameter

ashilkn 2 years ago
parent
commit
54b8e5bae5

+ 1 - 1
lib/ui/account/delete_account_page.dart

@@ -132,7 +132,7 @@ class DeleteAccountPage extends StatelessWidget {
 
     if (hasAuthenticated) {
       final choice = await showNewChoiceDialog(
-        context: context,
+        context,
         title: 'Are you sure you want to delete your account?',
         body:
             'Your uploaded data will be scheduled for deletion, and your account'

+ 2 - 2
lib/ui/account/password_reentry_page.dart

@@ -81,7 +81,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
             _logger.severe("Password verification failed", e, s);
             await dialog.hide();
             final dialogChoice = await showNewChoiceDialog(
-              context: context,
+              context,
               title: "Recreate password",
               body: "The current device is not powerful enough to verify your "
                   "password, so we need to regenerate it once in a way that "
@@ -103,7 +103,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
             _logger.severe("Password verification failed", e, s);
             await dialog.hide();
             final dialogChoice = await showNewChoiceDialog(
-              context: context,
+              context,
               title: "Incorrect password",
               body: "Please try again",
               firstButtonLabel: "Contact Support",

+ 2 - 2
lib/utils/dialog_util.dart

@@ -90,8 +90,8 @@ DialogWidget choiceDialog({
 }
 
 ///Will return null if dismissed by tapping outside
-Future<ButtonAction?> showNewChoiceDialog({
-  required BuildContext context,
+Future<ButtonAction?> showNewChoiceDialog(
+  BuildContext context, {
   required String title,
   String? body,
   required String firstButtonLabel,

+ 1 - 1
lib/utils/email_util.dart

@@ -254,8 +254,8 @@ Future<String> _clientInfo() async {
 
 void _showNoMailAppsDialog(BuildContext context, String toEmail) {
   showNewChoiceDialog(
+    context,
     icon: Icons.email_outlined,
-    context: context,
     title: 'Please email us at $toEmail',
     firstButtonLabel: "Copy email address",
     secondButtonLabel: "Dismiss",