restoreAll method
Implementation
Future<RestoreResult> restoreAll() async {
RestoreResult restoreResult = RestoreResult();
if (collections.isEmpty) {
restoreResult.hasError = true;
restoreResult.message = "Collections list empty!";
return restoreResult;
}
restoreResult.collection = collections.toString();
int done = 0;
for (var collection in collections) {
restore(collectionId: collection);
done++;
}
if (done != collections.length) {
restoreResult.hasError = true;
restoreResult.message = "All collections not restored!";
return restoreResult;
}
restoreResult.hasError = false;
restoreResult.message = "$done collections successfully restored!";
return restoreResult;
}