trip_routing 0.0.2 copy "trip_routing: ^0.0.2" to clipboard
trip_routing: ^0.0.2 copied to clipboard

Flutter on-device trip-routing calculator package for multiple waypoints, optimized for food traffic.

example/main.dart

import 'package:trip_routing/trip_routing.dart';
import 'package:latlong2/latlong.dart';

void main() async {
  final testPoints = [
    LatLng(50.77437074991441, 6.075419266272186),
    LatLng(50.778183576682636, 6.088382934817764)
  ];

  // Initialize Routing Service
  final routing = TripService();
  try {
    final trip = await routing.findTotalTrip(testPoints, preferWalkingPaths: true);
    print('Route: ${trip.route}');
    print('Distance: ${trip.distance} meters');
  } catch (e) {
    print('Error calculating route: $e');
  }
}
1
likes
0
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter on-device trip-routing calculator package for multiple waypoints, optimized for food traffic.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, flutter, http, latlong2

More

Packages that depend on trip_routing