show static method
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,
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,
),
);
}