loadBundle method

LoadBundleTask loadBundle(
  1. List<int> bundleData
)

Loads a Firestore bundle into the local cache.

bundleData holds the whole bundle. Returns a LoadBundleTask, which notifies callers with progress updates, and completion or error events. To load a bundle held in a string, pass utf8.encode(bundle); for a file or an HTTP response that arrives in chunks use loadBundleStream.

The named queries of the bundle become available through namedQuery.

final LoadBundleTaskSnapshot progress = await firestore
    .loadBundle(bundleBytes)
    .future;
print('${progress.documentsLoaded} documents loaded');

Implementation

LoadBundleTask loadBundle(List<int> bundleData) {
  return loadBundleStream(
    Stream<List<int>>.fromIterable(<List<int>>[bundleData]),
  );
}