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