show static method

Future<Prediction?> show({
  1. required BuildContext context,
  2. required String apiKey,
  3. String hint = "Search",
  4. num? offset,
  5. Location? location,
  6. num? radius,
  7. String? language,
  8. String? sessionToken,
  9. AddressListTileBuilder? listTileBuilder,
  10. List<String>? types,
  11. List<Component>? components,
  12. bool? strictbounds,
  13. ValueChanged<PlacesAutocompleteResponse>? onError,
  14. String? proxyBaseUrl,
  15. Client? httpClient,
})

Implementation

static Future<Prediction?> show(
    {required BuildContext context,
    required String apiKey,
    String hint = "Search",
    num? offset,
    Location? location,
    num? radius,
    String? language,
    String? sessionToken,
    AddressListTileBuilder? listTileBuilder,
    List<String>? types,
    List<Component>? components,
    bool? strictbounds,
    Widget? logo,
    ValueChanged<PlacesAutocompleteResponse>? onError,
    String? proxyBaseUrl,
    Client? httpClient}) async {
  final builder = (BuildContext ctx) => PlacesAutocompleteControl(
      key: Key("placesAutocomplete"),
      apiKey: apiKey,
      language: language,
      sessionToken: sessionToken,
      components: components,
      types: types,
      location: location,
      radius: radius,
      listTileBuilder: listTileBuilder,
      strictbounds: strictbounds,
      offset: offset,
      hint: hint,
      logo: logo,
      onError: onError,
      proxyBaseUrl: proxyBaseUrl,
      httpClient: httpClient);

  return await Navigator.push<Prediction>(
    context,
    PlatformPageRoute<Prediction>(
      builder: builder,
      settings: PathRouteSettings(
        route: "/addressPicker",
        label: "Address Picker",
      ),
      fullscreenDialog: true,
    ),
  );
}