Lint warnings fix

This commit is contained in:
Neeraj Gupta 2023-12-12 08:23:45 +05:30
parent 0e062eb2d9
commit 5d761e10c3

View file

@ -1,3 +1,4 @@
import "dart:async";
import 'dart:io';
import 'package:flutter/material.dart';
@ -53,7 +54,7 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
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<BackupSectionWidget> {
trailingIcon: Icons.chevron_right_outlined,
trailingIconIsMuted: true,
onTap: () async {
routeToPage(
await routeToPage(
context,
const BackupSettingsScreen(),
);
@ -133,10 +134,12 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
}
if (duplicates.isEmpty) {
unawaited(
showErrorDialog(
context,
S.of(context).noDuplicates,
S.of(context).youveNoDuplicateFilesThatCanBeCleared,
),
);
} else {
final DeduplicationResult? result =
@ -167,15 +170,17 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
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) {
unawaited(
showToast(
context,
S.of(context).remindToEmptyDeviceTrash,
),
);
}
},
@ -195,9 +200,11 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
isInAlert: true,
onTap: () async {
if (Platform.isIOS) {
unawaited(
showToast(
context,
S.of(context).remindToEmptyDeviceTrash,
),
);
}
},
@ -222,10 +229,12 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
firstButtonType: ButtonType.primary,
secondButtonLabel: S.of(context).ok,
secondButtonOnTap: () async {
unawaited(
showShortToast(
context,
S.of(context).remindToEmptyEnteTrash,
).ignore();
),
);
},
);
}