apple_maps_place_picker 0.1.0 copy "apple_maps_place_picker: ^0.1.0" to clipboard
apple_maps_place_picker: ^0.1.0 copied to clipboard

A Flutter plugin that provides native Apple Maps place picker for iOS.

Apple Maps Place Picker #

pub package likes popularity Flutter Platform

A Flutter plugin that provides a customizable place picker using Apple Maps. This plugin allows users to search for and select locations using Apple's native MapKit framework.

Note: This plugin is iOS-only as it uses Apple Maps.

Screenshots #

Light & Dark & Preview #

light dark preview

Features #

  • πŸ—ΊοΈ Native Apple Maps integration
  • πŸ” Built-in place search functionality
  • πŸ“ Custom marker support
  • 🎬 Custom bottom address view
  • 🎨 Customizable UI components
  • 🎯 Precise location selection

Prerequisites #

  1. iOS 15.0 or higher
  2. Flutter 3.3.10 or higher
  3. Valid Apple Developer account for MapKit usage

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  apple_maps_place_picker: ^0.1.0

Usage #

Basic Implementation #

AppleMapsPlacePicker(
  initialLatitude: 41.0082,
  initialLongitude: 28.9784,
  onPlaceSelected: (Place place) {
    print('Selected place: ${place.address}');
  },
)

Full Customization #

AppleMapsPlacePicker(
  initialLatitude: 41.0082,
  initialLongitude: 28.9784,
  config: PlacePickerConfig(
    searchBarConfig: SearchBarConfig(
      hintText: 'Search place',
      textFieldTextStyle: TextStyle(
        fontSize: 16,
        fontWeight: FontWeight.bold,
      ),
      backgroundColor: Colors.white,
    ),
    searchResultConfig: SearchResultConfig(
      itemTextStyle: TextStyle(
        fontSize: 16,
        color: Colors.black87,
      ),
      backgroundColor: Colors.grey[100],
    ),
    addressViewConfig: AddressViewConfig(
      confirmButtonText: 'Confirm',
      addressTextStyle: TextStyle(
        fontSize: 18,
        fontWeight: FontWeight.w300,
      ),
    ),
  ),
  onPlaceSelected: (Place place) {
    print('Selected place: ${place.address}');
  },
)

Custom Marker #

AppleMapsPlacePicker(
  initialLatitude: 41.0082,
  initialLongitude: 28.9784,
  onPlaceSelected: (Place place) {
    print('Selected place: ${place.address}');
  },
  customMarker: Container(
    width: 50,
    height: 50,
    decoration: BoxDecoration(
      color: Colors.blue,
      shape: BoxShape.circle,
    ),
  ),
)

Custom Bottom Address View #

AppleMapsPlacePicker(
  initialLatitude: 41.0082,
  initialLongitude: 28.9784,
  onPlaceSelected: (Place place) {
    print('Selected place: ${place.address}');
  },
  customBottomSheet: (Place? place) {
    return Container(
      color: Colors.white,
      padding: EdgeInsets.all(16),
      child: Column(
        children: [
          Text(place?.address ?? 'Not found'),
          ElevatedButton(
            onPressed: () {
              // Handle confirmation
            },
            child: Text('Confirm Location'),
          ),
        ],
      ),
    );
  },
)

TODO #

Upcoming features and improvements:

  • ❌ Add "My Location" button functionality
  • ❌ Implement custom map styles support
  • ❌ Support for custom search UI

Example #

For a complete example, check the example directory.

Contributing #

Contributions are welcome! If you find a bug or want a feature, please open an issue.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Author #

Shahmirzali Huseynov (Linkedin)

6
likes
0
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin that provides native Apple Maps place picker for iOS.

Repository (GitHub)
View/report issues

Topics

#maps #location #apple-maps #place-picker #ios

License

unknown (license)

Dependencies

flutter, pointer_interceptor

More

Packages that depend on apple_maps_place_picker