From 5d761e10c37a92a36bdbb1a329bf7e8122ee18ba Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Tue, 12 Dec 2023 08:23:45 +0530 Subject: [PATCH] Lint warnings fix --- .../backup/backup_section_widget.dart | 43 +++++++++++-------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/lib/ui/settings/backup/backup_section_widget.dart b/lib/ui/settings/backup/backup_section_widget.dart index 60d144f99..daddde047 100644 --- a/lib/ui/settings/backup/backup_section_widget.dart +++ b/lib/ui/settings/backup/backup_section_widget.dart @@ -1,3 +1,4 @@ +import "dart:async"; import 'dart:io'; import 'package:flutter/material.dart'; @@ -53,7 +54,7 @@ class BackupSectionWidgetState extends State { trailingIcon: Icons.chevron_right_outlined, trailingIconIsMuted: true, onTap: () async { - routeToPage( + await routeToPage( context, BackupFolderSelectionPage( buttonText: S.of(context).backup, @@ -70,7 +71,7 @@ class BackupSectionWidgetState extends State { trailingIcon: Icons.chevron_right_outlined, trailingIconIsMuted: true, onTap: () async { - routeToPage( + await routeToPage( context, const BackupSettingsScreen(), ); @@ -133,10 +134,12 @@ class BackupSectionWidgetState extends State { } if (duplicates.isEmpty) { - showErrorDialog( - context, - S.of(context).noDuplicates, - S.of(context).youveNoDuplicateFilesThatCanBeCleared, + unawaited( + showErrorDialog( + context, + S.of(context).noDuplicates, + S.of(context).youveNoDuplicateFilesThatCanBeCleared, + ), ); } else { final DeduplicationResult? result = @@ -167,15 +170,17 @@ class BackupSectionWidgetState extends State { S.of(context).youHaveSuccessfullyFreedUp(formatBytes(status.size)), firstButtonLabel: S.of(context).rateUs, firstButtonOnTap: () async { - UpdateService.instance.launchReviewUrl(); + await UpdateService.instance.launchReviewUrl(); }, firstButtonType: ButtonType.primary, secondButtonLabel: S.of(context).ok, secondButtonOnTap: () async { if (Platform.isIOS) { - showToast( - context, - S.of(context).remindToEmptyDeviceTrash, + unawaited( + showToast( + context, + S.of(context).remindToEmptyDeviceTrash, + ), ); } }, @@ -195,9 +200,11 @@ class BackupSectionWidgetState extends State { isInAlert: true, onTap: () async { if (Platform.isIOS) { - showToast( - context, - S.of(context).remindToEmptyDeviceTrash, + unawaited( + showToast( + context, + S.of(context).remindToEmptyDeviceTrash, + ), ); } }, @@ -222,10 +229,12 @@ class BackupSectionWidgetState extends State { firstButtonType: ButtonType.primary, secondButtonLabel: S.of(context).ok, secondButtonOnTap: () async { - showShortToast( - context, - S.of(context).remindToEmptyEnteTrash, - ).ignore(); + unawaited( + showShortToast( + context, + S.of(context).remindToEmptyEnteTrash, + ), + ); }, ); }