Skip to content

Suggestion is showing behind back button in Andorid. #84

Description

@lakshydeep-14

Here the suggestion is going behind the back button.
here is the full code.

Image
GestureDetector(
                      onTap: () {
                        FocusScope.of(context).unfocus();
                      },
                      child: SizedBox(
                        height: 50,
                        child: GooglePlaceAutoCompleteTextField(
                          textEditingController: _locationController,
                          // focusNode: _focusNode,
                          googleAPIKey: kGoogleApiKey,
                          countries: ["au"],
                          isLatLngRequired: false,
                          debounceTime: 300,
                          isCrossBtnShown: false,
                          boxDecoration: BoxDecoration(
                            color: AppColor.neutral200,
                            borderRadius: BorderRadius.circular(18),
                          ),
                          itemBuilder: (context, index, prediction) {
                            return Padding(
                              padding: const EdgeInsets.all(8.0),
                              child: Text(prediction.description ?? ''),
                            );
                          },

                          inputDecoration: InputDecoration(
                            hintText: "Enter address",
                            filled: true,
                            fillColor: AppColor.neutral50,
                            contentPadding: const EdgeInsets.symmetric(
                              horizontal: 16,
                              vertical: 12,
                            ),
                            border: OutlineInputBorder(
                              borderRadius: BorderRadius.circular(12),
                              borderSide: BorderSide(
                                color: AppColor.neutral200,
                                width: 1.5,
                              ),
                            ),
                            enabledBorder: OutlineInputBorder(
                              borderRadius: BorderRadius.circular(12),
                              borderSide: BorderSide(
                                color: AppColor.neutral200,
                                width: 1.5,
                              ),
                            ),
                            focusedBorder: OutlineInputBorder(
                              borderRadius: BorderRadius.circular(12),
                              borderSide: BorderSide(
                                color: AppColor.neutral200,
                                width: 1.5,
                              ),
                            ),
                            disabledBorder: OutlineInputBorder(
                              borderRadius: BorderRadius.circular(12),
                              borderSide: BorderSide(
                                color: AppColor.neutral200,
                                width: 1.5,
                              ),
                            ),
                          ),

                          getPlaceDetailWithLatLng: (prediction) {
                            _locationController.text =
                                prediction.description ?? '';
                          },
                          itemClick: (prediction) {
                            _locationController.text =
                                prediction.description ?? '';
                            setState(() {
                              _selectedLocation = Location(
                                address: prediction.description,
                                latitude: double.tryParse(
                                  prediction.lat ?? '0.0',
                                ),
                                longitude: double.tryParse(
                                  prediction.lng ?? '0.0',
                                ),
                              );
                            });
                          },
                        ),
                      ),
                    ),

                   ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions