navigateWithLatLng method
dynamic
navigateWithLatLng({
provide source, destination and RoutingMethod to navigate with the shorted/fastest route
Implementation
navigateWithLatLng({
required BuildContext context,
required LatLng source,
required LatLng destination,
required RoutingMethods method,
}) async {
var data = await getNavigationData(
source: source, destination: destination, method: method);
NavigationModel navData = NavigationModel.fromJson(data["routes"].first);
if (context.mounted) {
navigate(context: context, navData: navData, method: method);
}
}