geo_selector 0.0.1 copy "geo_selector: ^0.0.1" to clipboard
geo_selector: ^0.0.1 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 Example")),
        body: GeoSelector(
          initialLocation: const LatLng(28.6139, 77.2090),
          enableMyLocation: true,
          showAddress: true,
          enableSearch: true, // This enables the search bar
          onLocationSelected: (result) {
            print("Selected => $result");
          },
        ),
      ),
    );
  }
}
0
likes
130
points
28
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_map, geocoding, http, latlong2, location

More

Packages that depend on geo_selector