mapbox_place_search 1.0.2 mapbox_place_search: ^1.0.2 copied to clipboard
MapBox Places auto-complete search box.
mapbox_place_search #
- Flutter Package to integrate mapbox search api with a search box UI.
Features #
- Supports multiple countries just change the abbreviations of the countries like US, FR etc.
Getting started #
Install the package #
flutter pub add mapbox_place_search
mapbox_place_search: latest
Usage #
import 'package:mapbox_place_search/mapbox_place_search.dart';
class _SearchScreenState extends State<SearchScreen> {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: Center(
child: MapBoxPlaceSearchWidget(
country: 'FR',
popOnSelect: false,
apiKey: "MAPBOX_PUBLIC_KEY",
searchHint: 'Enter your Destination',
onSelected: (place) {
print(place.center);
},
context: context,
),
),
),
);
}
}