LoadBundleTaskSnapshot class

Represents a progress update or a final state from loading bundles.

A LoadBundleTask reports one of these after the bundle metadata is read (state LoadBundleTaskState.running), after each document, and at the end (state LoadBundleTaskState.success or LoadBundleTaskState.error).

firestore.loadBundle(bundleBytes).stream.listen((LoadBundleTaskSnapshot p) {
  if (p.taskState == LoadBundleTaskState.running && p.totalBytes > 0) {
    print('${(100 * p.bytesLoaded / p.totalBytes).round()} %');
  }
});

Properties

bytesLoaded → int
How many bytes have been loaded.
final
documentsLoaded → int
How many documents have been loaded.
final
exception → Object?
If the LoadBundleTask failed, the exception. Otherwise null.
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
taskState → LoadBundleTaskState
The current state of the LoadBundleTask.
final
totalBytes → int
The total number of bytes in the bundle. 0 if the bundle failed to parse.
final
totalDocuments → int
The total number of documents in the bundle. 0 if the bundle failed to parse.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override