свойство completed
Future<Database> completedПредоставляет Future, которое будет завершено, как только транзакция будет завершена.
Future выдаст ошибку, если произойдёт ошибка в транзакции или если транзакция прервана.
Исходный код
Future<Database> get completed {
var completer = new Completer<Database>();
this.onComplete.first.then((_) {
completer.complete(db);
});
this.onError.first.then((e) {
completer.completeError(e);
});
this.onAbort.first.then((e) {
// Avoid completing twice if an error occurs.
if (!completer.isCompleted) {
completer.completeError(e);
}
});
return completer.future;
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-indexed_db/Transaction/completed.html