loadRows method

Future<void> loadRows(
  1. FutureOr<List<Map<String, Object?>>> rows
)

Replaces the contents of a local, adapter-less dataset.

This is the ergonomic in-memory mode for applications that want the dataset itself to own the record store. It cannot be mixed with an adapter-backed dataset; use open when an adapter is configured.

Implementation

Future<void> loadRows(FutureOr<List<Map<String, Object?>>> rows) {
  if (rows is List<Map<String, Object?>>) {
    _lifecycleCoordinator.loadRowsSync(rows);
    return Future<void>.value();
  }
  return _lifecycleCoordinator.loadRows(rows);
}