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

A Flutter package for picking, searching, and selecting locations using OpenStreetMap with address details.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:geo_selector/geo_selector.dart';
import 'package:latlong2/latlong.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text("Location Selector with Route")),
        body: GeoSelector(
          initialLocation: const LatLng(28.6139, 77.2090),
          enableMyLocation: true,
          showAddress: true,
          enableSearch: true,
          enableRoute: true, // Enable route functionality
          onLocationSelected: (result) {
            print("Selected => $result");
          },
          onRouteCalculated: (route) {
            print("Route calculated with ${route.length} points");
          },
        ),
      ),
    );
  }
}
0
likes
150
points
65
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for picking, searching, and selecting locations using OpenStreetMap with address details.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_map, geocoding, http, latlong2, location

More

Packages that depend on geo_selector