isValid property

bool get isValid

Checks if the route is valid (not stale and reasonable cost)

Implementation

bool get isValid => !isStale && cost >= 0 && cost < 1e6;