fysoul17 / google_maps_place_picker

Place picker on Google Maps for Flutter
MIT License
223 stars 365 forks source link

When Autocompleting, Search Input Field left behind results #154

Open draxexx opened 2 years ago

draxexx commented 2 years ago

Hi,

I'm using PlacePicker widget, when I'm searching, results stay in front of the Search Input Field.

Screenshot_1636540728

Here is my code:

PlacePicker(
              apiKey: _apiKey,
              initialPosition: LatLng(
                _locationModel.lat,
                _locationModel.lng,
              ),
              hintText: "Adres giriniz",
              searchingText: "Aranıyor...",
              selectInitialPosition: true,
              automaticallyImplyAppBarLeading: false,
              selectedPlaceWidgetBuilder:
                  (_, selectedPlace, state, isSearchBarFocused) {
                return isSearchBarFocused
                    ? Container()
                    : FloatingCard(
                        bottomPosition: 0.0,
                        leftPosition: 0.0,
                        rightPosition: 0.0,
                        borderRadius: BorderRadius.only(
                          topRight: Radius.circular(10),
                          topLeft: Radius.circular(10),
                        ),
                        child: state == SearchingState.Searching
                            ? Center(
                                child: CircularProgressIndicator(),
                              )
                            : Container(
                                padding: const EdgeInsets.all(15),
                                child: Column(
                                  children: [
                                    ContentTextWidget(
                                      text: selectedPlace.formattedAddress,
                                      textAlign: TextAlign.center,
                                    ),
                                    SizedBox(height: 20),
                                    ButtonWidget(
                                      onTap: () =>
                                          _onPlaceSelected(selectedPlace),
                                      text: "Lokasyonu Seç",
                                      bgColor: orangeLight,
                                      textColor: Colors.white,
                                    ),
                                  ],
                                ),
                              ),
                      );
              },
            ),