call method

Implementation

BeamLocation call(BeamState state) {
  var matched = SimpleBeamLocation.chooseRoutes(state, routes.keys);
  if (matched.isNotEmpty) {
    return SimpleBeamLocation(
      state: state,
      routes: Map.fromEntries(
          routes.entries.where((e) => matched.containsKey(e.key))),
      navBuilder: builder,
    );
  } else {
    return NotFound(path: state.uri.path);
  }
}