triggerQuery method
void
triggerQuery()
Implementation
void triggerQuery() async {
final GoogleMapController controller = await _controller.future;
// apply map bounds
LatLngBounds bounds = await controller.getVisibleRegion();
String north = bounds.northeast.latitude.toString();
String south = bounds.southwest.latitude.toString();
String east = bounds.northeast.longitude.toString();
String west = bounds.southwest.longitude.toString();
var value = {
"geoBoundingBox": {
"topLeft": north + "," + west,
"bottomRight": south + "," + east,
}
};
widget.searchController.setValue(value,
options: Options(
triggerDefaultQuery: true,
));
}