1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-09 14:28:51 +00:00

Add unawaited_futures (#1148)

This commit is contained in:
Brett Morgan
2022-04-27 09:24:19 +10:00
committed by GitHub
parent 802026f4ea
commit f998c9577e
12 changed files with 26 additions and 23 deletions

View File

@@ -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);
}
}
}