recordNavigation function

RouteGraphFile recordNavigation(
  1. RouteGraphFile g,
  2. String? from,
  3. String to,
  4. String ts,
)

The one composite the cache manager calls.

Implementation

RouteGraphFile recordNavigation(
  RouteGraphFile g,
  String? from,
  String to,
  String ts,
) {
  var next = addRouteNode(g, to, ts);
  if (from != null && from.trim().isNotEmpty) {
    next = ensureNode(next, from, ts);
    next = addRouteEdge(next, from, to, ts);
  }
  return next;
}