location_picker_flutter_map 1.1.5 location_picker_flutter_map: ^1.1.5 copied to clipboard
Package that provides Place search and Location picker for flutter maps with alot of cusomizations using Open Street Map
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(
body: FlutterLocationPicker(
initZoom: 11,
minZoomLevel: 5,
maxZoomLevel: 16,
trackMyPosition: true,
searchBarBackgroundColor: Colors.white,
mapLanguage: 'ar',
onError: (e) => print(e),
onPicked: (pickedData) {
print(pickedData.latLong.latitude);
print(pickedData.latLong.longitude);
print(pickedData.address);
print(pickedData.addressData['country']);
}),
),
);
}
}