location_picker_flutter_map 3.1.0 copy "location_picker_flutter_map: ^3.1.0" to clipboard
location_picker_flutter_map: ^3.1.0 copied to clipboard

Package that provides Place search and Location picker for flutter maps with a lot of customizations using Open Street Map

example/lib/main.dart

// ignore_for_file: avoid_print

import 'package:flutter/material.dart';
import 'package:location_picker_flutter_map/location_picker_flutter_map.dart';

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Location Picker',
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter Location Picker'),
        ),
        body: FlutterLocationPicker(
          initZoom: 11,
          minZoomLevel: 5,
          maxZoomLevel: 16,
          trackMyPosition: true,
          searchBarBackgroundColor: Colors.white,
          selectedLocationButtonTextStyle: const TextStyle(fontSize: 18),
          mapLanguage: 'en',
          onError: (e) => print(e),
          selectLocationButtonLeadingIcon: const Icon(Icons.check),
          onPicked: (pickedData) {
            print(pickedData.latLong.latitude);
            print(pickedData.latLong.longitude);
            print(pickedData.address);
            print(pickedData.addressData);
          },
          onChanged: (pickedData) {
            print(pickedData.latLong.latitude);
            print(pickedData.latLong.longitude);
            print(pickedData.address);
            print(pickedData.addressData);
          },
          showContributorBadgeForOSM: true,
        ),
      ),
    );
  }
}
77
likes
150
pub points
93%
popularity

Publisher

unverified uploader

Package that provides Place search and Location picker for flutter maps with a lot of customizations using Open Street Map

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_map, flutter_map_cancellable_tile_provider, flutter_map_location_marker, http, intl, latlong2, location, url_launcher

More

Packages that depend on location_picker_flutter_map