Spec-Zone.ru › Dart 1

dart:indexed_db

свойство 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API