OpenStreetMapSearchAndPick constructor

const OpenStreetMapSearchAndPick({
  1. Key? key,
  2. required void onPicked(
    1. PickedData pickedData
    ),
  3. InputDecoration? inputDecoration,
  4. TextStyle? inputTextStyle,
  5. IconData zoomOutIcon = Icons.zoom_out_map,
  6. IconData zoomInIcon = Icons.zoom_in_map,
  7. IconData currentLocationIcon = Icons.my_location,
  8. Color buttonColor = Colors.blue,
  9. Color locationPinIconColor = Colors.blue,
  10. String locationPinText = 'Location',
  11. TextStyle locationPinTextStyle = const TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color: Colors.blue),
  12. String hintText = 'Search Location',
  13. TextStyle buttonTextStyle = const TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color: Colors.white),
  14. Color buttonTextColor = Colors.white,
  15. String buttonText = 'Set Current Location',
  16. double buttonHeight = 50,
  17. double buttonWidth = 200,
  18. String baseUri = 'https://nominatim.openstreetmap.org',
  19. IconData locationPinIcon = Icons.location_on,
})

Implementation

const OpenStreetMapSearchAndPick({
  Key? key,
  required this.onPicked,
  this.inputDecoration,
  this.inputTextStyle,
  this.zoomOutIcon = Icons.zoom_out_map,
  this.zoomInIcon = Icons.zoom_in_map,
  this.currentLocationIcon = Icons.my_location,
  this.buttonColor = Colors.blue,
  this.locationPinIconColor = Colors.blue,
  this.locationPinText = 'Location',
  this.locationPinTextStyle = const TextStyle(
      fontSize: 16, fontWeight: FontWeight.bold, color: Colors.blue),
  this.hintText = 'Search Location',
  this.buttonTextStyle = const TextStyle(
      fontSize: 16, fontWeight: FontWeight.bold, color: Colors.white),
  this.buttonTextColor = Colors.white,
  this.buttonText = 'Set Current Location',
  this.buttonHeight = 50,
  this.buttonWidth = 200,
  this.baseUri = 'https://nominatim.openstreetmap.org',
  this.locationPinIcon = Icons.location_on,
}) : super(key: key);