Pakete, Repositories und App-Kategorien suchen

GitHub-RepositoryShrutimahajan/Google-AutoComplete-TextField-Flutter

Google-Auto-Vervollständigen-Textfeld-Flutter

Shrutimahajan/Google-AutoComplete-TextField-Flutter open-source repository details.

Projektcover von Google-Auto-Vervollständigen-Textfeld-Flutter
Sterne
41
Forks
175
Letzter Push (UTC)
09.05.2026
Projektstatus
Aktiv

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

google_places_flutter

Add dependency into pubspec.yml

dependencies:
  flutter:
    sdk: flutter
  google_places_flutter: <last-version>
  

Google AutoComplete TextField Widget code

    GooglePlaceAutoCompleteTextField(
        textEditingController: controller,
        googleAPIKey: "YOUR_GOOGLE_API_KEY",
        inputDecoration: InputDecoration()
        debounceTime: 800 // default 600 ms,
        countries: ["in","fr"],// optional by default null is set
        isLatLngRequired:true,// if you required coordinates from place detail
        getPlaceDetailWithLatLng: (Prediction prediction) {
         // this method will return latlng with place detail
        print("placeDetails" + prediction.lng.toString());
        }, // this callback is called when isLatLngRequired is true
        itemClick: (Prediction prediction) {
         controller.text=prediction.description;
          controller.selection = TextSelection.fromPosition(TextPosition(offset: prediction.description.length));
        }
        // if we want to make custom list item builder
        itemBuilder: (context, index, Prediction prediction) {
          return Container(
            padding: EdgeInsets.all(10),
            child: Row(
              children: [
                Icon(Icons.location_on),
                SizedBox(
                  width: 7,
                ),
                Expanded(child: Text("${prediction.description??""}"))
              ],
            ),
          );
        }
        // if you want to add seperator between list items
        seperatedBuilder: Divider(),
        // want to show close icon 
        isCrossBtnShown: true,
        // optional container padding
         containerHorizontalPadding: 10,
         // place type
        placeType: PlaceType.geocode,
        // keyboard type (defaults to TextInputType.streetAddress)
        keyboardType: TextInputType.text, // optional - defaults to streetAddress for better address input
         
         
        
        
    )
    

Customization Option

You can customize a text field input decoration and debounce time

Screenshorts

Shrutimahajan GitHub avatar
GitHub-Autor

Shrutimahajan ↗

SprachenDartKotlinSwiftObjective-C

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 4 Einträge

  • flutter{"sdk":"flutter"}
  • dio^5.4.0
  • rxdart^0.28.0
  • flutter_testEntwicklung{"sdk":"flutter"}

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗