{"id":32285102,"url":"https://github.com/brasilflutter/flutter_geo_direction","last_synced_at":"2026-06-21T16:31:28.094Z","repository":{"id":153901054,"uuid":"631037239","full_name":"brasilflutter/flutter_geo_direction","owner":"brasilflutter","description":"A package to find routes between geolocation points.","archived":false,"fork":false,"pushed_at":"2024-05-01T02:35:58.000Z","size":5392,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T10:15:52.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/geo_direction","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brasilflutter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-21T19:01:54.000Z","updated_at":"2025-04-17T07:20:11.000Z","dependencies_parsed_at":"2024-04-30T23:43:44.187Z","dependency_job_id":"2bad8ae2-656e-4613-9e0f-9ed819aff53a","html_url":"https://github.com/brasilflutter/flutter_geo_direction","commit_stats":null,"previous_names":["brasilflutter/flutter_geo_direction"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/brasilflutter/flutter_geo_direction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasilflutter%2Fflutter_geo_direction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasilflutter%2Fflutter_geo_direction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasilflutter%2Fflutter_geo_direction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasilflutter%2Fflutter_geo_direction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brasilflutter","download_url":"https://codeload.github.com/brasilflutter/flutter_geo_direction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasilflutter%2Fflutter_geo_direction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34618474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-23T01:42:59.040Z","updated_at":"2026-06-21T16:31:28.089Z","avatar_url":"https://github.com/brasilflutter.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# GeoDirection\nUm pacote Flutter que usa a API do Google Maps para obter rotas entre coordenadas geográficas. Ele retorna uma lista de pontos LatLng que pode ser usada para renderizar uma rota no Google Maps.\n\n## Instalação\nAdicione esta linha ao pubspec.yaml do seu projeto:\n```\ndependencies:\n  geo_direction: \n```\nE rode o seguinte comando:\n```\nflutter pub get\n```\n\n## Screenshots\n\n![image](https://github.com/brasilflutter/flutter_geo_direction/assets/30914699/d875f514-2655-4fee-a15b-4e0ee9af433b)\n\n\n## Exemplo usando em conjunto com o google_maps_flutter \n\n```dart\n\nclass HomeView extends StatefulWidget {\n  const HomeView({super.key});\n  @override\n  State\u003cHomeView\u003e createState() =\u003e _HomeViewState();\n}\n\nclass _HomeViewState extends State\u003cHomeView\u003e {\n  final Completer\u003cGoogleMapController\u003e _controller = Completer();\n  static const LatLng sourceLocation = LatLng(37.33500926, -122.03272188);\n  static const LatLng destination = LatLng(37.33429383, -122.06600055);\n  @override\n  void initState() {\n    super.initState();\n    getPolyPoints();\n  }\n\n  List\u003cLatLng\u003e polylineCoordinates = [];\n  void getPolyPoints() async {\n    final geoDirection = GeoDirection();\n    final result = await geoDirection.getDirectionsBetweenCoordinates(\n      request: GeoRequestDto(\n        googleApiKey: \"YOUR_API_KEY\",\n        origin: PointLatLngDto(\n          latitude: sourceLocation.latitude,\n          longitude: sourceLocation.longitude,\n        ),\n        destination: PointLatLngDto(\n          latitude: destination.latitude,\n          longitude: destination.longitude,\n        ),\n      ),\n    );\n    if (result.points.isNotEmpty) {\n      for (var point in result.points) {\n        polylineCoordinates.add(\n          LatLng(point.latitude, point.longitude),\n        );\n      }\n    }\n    setState(() {});\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: GoogleMap(\n        mapType: MapType.hybrid,\n        initialCameraPosition: const CameraPosition(\n          target: sourceLocation,\n          zoom: 13.5,\n        ),\n        markers: {\n          const Marker(\n            markerId: MarkerId(\"source\"),\n            position: sourceLocation,\n          ),\n          const Marker(\n            markerId: MarkerId(\"destination\"),\n            position: destination,\n          ),\n        },\n        onMapCreated: (GoogleMapController controller) {\n          _controller.complete(controller);\n        },\n        polylines: {\n          Polyline(\n            polylineId: const PolylineId(\"route\"),\n            points: polylineCoordinates,\n            color: const Color(0xFF7B61FF),\n            width: 6,\n          ),\n        },\n      ),\n    );\n  }\n}\n\n```\n\n\n\n\n## Autores\n- [@viniciusoliverrs](https://github.com/viniciusoliverrs)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrasilflutter%2Fflutter_geo_direction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrasilflutter%2Fflutter_geo_direction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrasilflutter%2Fflutter_geo_direction/lists"}