mirror of
https://github.com/flutter/samples.git
synced 2025-11-13 00:08:24 +00:00
Add unawaited_futures (#1148)
This commit is contained in:
@@ -144,7 +144,7 @@ class ProfilesStore extends ChangeNotifier {
|
||||
|
||||
/// Save file to disk if path was provided.
|
||||
if (savePath != null) {
|
||||
file.saveTo(savePath);
|
||||
await file.saveTo(savePath);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ class SavedLintsPage extends StatelessWidget {
|
||||
|
||||
break;
|
||||
case 'Delete':
|
||||
profilesStore.deleteProfile(profile);
|
||||
await profilesStore.deleteProfile(profile);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class HiveService {
|
||||
List<T> existingProducts = await getBoxes(boxName);
|
||||
|
||||
if (!existingProducts.contains(item)) {
|
||||
openBox.add(item);
|
||||
await openBox.add(item);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -28,7 +28,7 @@ class HiveService {
|
||||
|
||||
for (var item in items) {
|
||||
if (!existingProducts.contains(item)) {
|
||||
openBox.add(item);
|
||||
await openBox.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ class HiveService {
|
||||
|
||||
for (var box in boxes) {
|
||||
if (box == item) {
|
||||
openBox.deleteAt(boxes.indexOf(item));
|
||||
await openBox.deleteAt(boxes.indexOf(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ class HiveService {
|
||||
|
||||
for (var box in boxes) {
|
||||
if (box == item) {
|
||||
openBox.putAt(boxes.indexOf(item), newItem);
|
||||
await openBox.putAt(boxes.indexOf(item), newItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ class _LintExpansionTileState extends State<LintExpansionTile> {
|
||||
},
|
||||
);
|
||||
if (destinationProfileType == ProfileType.newProfile) {
|
||||
showDialog<String>(
|
||||
await showDialog<String>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return _NewProfileDialog(rule: rule);
|
||||
@@ -147,7 +147,7 @@ class _LintExpansionTileState extends State<LintExpansionTile> {
|
||||
);
|
||||
} else if (destinationProfileType ==
|
||||
ProfileType.existingProfile) {
|
||||
showDialog<String>(
|
||||
await showDialog<String>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return _ExistingProfileDialog(rule: rule);
|
||||
|
||||
Reference in New Issue
Block a user