emptyGraph function

RouteGraphFile emptyGraph()

Pure, copy-on-write operations over the route graph. A fresh graph is created synced: there is nothing to ship yet, and creating it dirty would upload an empty graph on the first tick.

Implementation

/// A fresh graph is created **synced**: there is nothing to ship yet, and
/// creating it dirty would upload an empty graph on the first tick.
RouteGraphFile emptyGraph() => const RouteGraphFile(
      schemaVersion: kCacheSchemaVersion,
      type: 'route_graph',
      nodes: <RouteGraphNode>[],
      edges: <RouteGraphEdge>[],
      sync: SyncMeta.clean,
    );