showSearchDialog function

dynamic showSearchDialog(
  1. BuildContext context,
  2. dynamic addressLabelState,
  3. dynamic getLocation(
    1. LatLng
    ),
  4. String apiKey,
  5. Language mapLanguage,
  6. Widget loader,
)

Implementation

showSearchDialog(
  BuildContext context,
  dynamic addressLabelState,
  dynamic Function(LatLng) getLocation,
  String apiKey,
  Language mapLanguage,
  Widget loader,
) {
  return showDialog(
    context: context,
    barrierDismissible: false,
    builder: (context) {
      return WillPopScope(
        onWillPop: () async => false,
        child: Dialog(
          backgroundColor: Colors.transparent,
          elevation: 0.0,
          insetPadding: const EdgeInsets.all(0.0),
          child: SearchWidget(
            addressLabelState: addressLabelState,
            getLocation: getLocation,
            mapLanguage: mapLanguage,
            apiKey: apiKey,
            loader: loader,
          ),
        ),
      );
    },
  );
}