location_picker_plus 2.0.0 copy "location_picker_plus: ^2.0.0" to clipboard
location_picker_plus: ^2.0.0 copied to clipboard

A comprehensive Flutter plugin for location selection with dropdown/autocomplete modes AND live GPS location detection with geocoding support.

2.0.0 #

πŸš€ Major New Features - Live Location Detection #

New Components

  • βœ… LocationDetectorWidget: Live GPS location detection with geocoding
  • βœ… LocationDetectorService: Comprehensive location services
  • βœ… LocationModel: Enhanced location data with full address breakdown
  • βœ… Flexible Detection Modes: GPS detection, address search, or both

Live Location Features

  • 🌍 GPS Location Detection: Get current location with one tap
  • πŸ” Address Geocoding: Search any address and get coordinates
  • 🏠 Reverse Geocoding: Convert coordinates to readable addresses
  • πŸ“ Forward Geocoding: Convert addresses to coordinates
  • πŸ” Auto Permission Handling: Handles all location permissions automatically
  • ⚑ High Accuracy GPS: Configurable accuracy levels
  • 🌐 Multi-locale Support: Address detection in multiple languages
  • πŸ“± Cross-platform: Full Android and iOS support

New Dependencies

  • geolocator: ^14.0.2 - GPS location services
  • geocoding: ^4.0.0 - Address geocoding services
  • permission_handler: ^12.0.1 - Location permission management

Enhanced API

// Live location detection
LocationDetectorWidget(
  mode: LocationDetectorMode.both,
  showCoordinates: true,
  onLocationChanged: (location) {
    print('Lat: ${location?.latitude}, Lng: ${location?.longitude}');
    print('Address: ${location?.fullAddress}');
  },
)

// Service usage
LocationModel? location = await LocationDetectorService.instance
    .getCurrentLocationWithAddress();

Breaking Changes

  • Minimum Flutter version remains >=3.3.0
  • New permissions required for location features
  • Added new dependencies (geolocator, geocoding, permission_handler)

Migration Guide

  • Existing LocationPickerWidget usage unchanged
  • New LocationDetectorWidget is separate - no migration needed
  • Add location permissions to your app if using location detection

Platform Support

  • Android: Requires location permissions in AndroidManifest.xml
  • iOS: Requires NSLocationWhenInUseUsageDescription in Info.plist
  • Web: Limited location support (browser-dependent)
  • Desktop: Windows, macOS, Linux supported

1.0.1 #

Documentation Update #

  • Updated repository URLs to point to new GitHub repository
  • Fixed package name references in README documentation

1.0.0 #

Initial Release #

Features

  • βœ… Two Input Modes: Dropdown with search OR Real-time autocomplete
  • βœ… Instant Suggestions: See suggestions as you type (no Enter key needed)
  • βœ… Debounced Performance: Optimized for smooth typing experience (50ms debounce)
  • βœ… Smart Search: Built-in search with relevance sorting (exact matches first)
  • βœ… Customizable Themes: Multiple pre-built themes and full customization support
  • βœ… Flag Emojis & Phone Codes: Display country flags and phone codes
  • βœ… Flexible Layouts: Horizontal/vertical layouts with responsive design
  • βœ… Asset-based Data: Load location data from JSON assets
  • βœ… Enhanced Models: Rich data models with additional properties (lat/lng, state codes, capitals)
  • βœ… Animation Support: Smooth transitions and animations
  • βœ… Accessibility: Screen reader support and keyboard navigation

Components Included

  • LocationPickerWidget: Main widget with full customization
  • AutocompleteDropdown: Real-time suggestions as you type
  • CustomDropdown: Traditional dropdown with search
  • LocationPickerTheme: Comprehensive theming system
  • LocationService: Efficient data loading and caching
  • Enhanced models: CountryModel, StateModel, CityModel

Customization Options

  • 25+ theme properties for complete UI control
  • 3 pre-built themes: Default, Material, Cupertino
  • Individual component control: Show/hide country, state, city
  • Custom hints and labels for each field
  • Flexible positioning and spacing options
  • Custom asset paths for your own location data

Technical Features

  • Efficient caching with singleton pattern
  • Optimized filtering with smart relevance sorting
  • Debounced input for better performance
  • Overlay positioning with screen edge detection
  • Memory efficient list handling
  • Error handling with user-friendly messages

Assets Included

  • Complete country list with flags and phone codes
  • State/province data for major countries
  • City data with geographic information
  • JSON format for easy customization

Example Usage #

// Autocomplete mode
LocationPickerWidget(
  useAutocomplete: true,
  onCountryChanged: (country) => print(country?.name),
)

// Dropdown mode
LocationPickerWidget(
  useAutocomplete: false,
  theme: LocationPickerTheme.materialTheme(),
  onCountryChanged: (country) => print(country?.name),
)
3
likes
0
points
328
downloads

Publisher

verified publisherbrewnbeer.com

Weekly Downloads

A comprehensive Flutter plugin for location selection with dropdown/autocomplete modes AND live GPS location detection with geocoding support.

Repository (GitHub)
View/report issues

Topics

#location #picker #geocoding #gps #flutter

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, geocoding, geolocator, permission_handler, plugin_platform_interface, web

More

Packages that depend on location_picker_plus

Packages that implement location_picker_plus