google_places_autocomplete_text_field 0.0.3 copy "google_places_autocomplete_text_field: ^0.0.3" to clipboard
google_places_autocomplete_text_field: ^0.0.3 copied to clipboard

outdated

A fully customizable Google Places autocomplete text form field for Flutter iOS and Android.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:google_places_autocomplete_text_field/google_places_autocomplete_text_field.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Google Places Autocomplete Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Google Places Autocomplete Demo'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  MyHomePage({super.key, required this.title});

  final String title;

  final _yourGoogleAPIKey = 'foo-bar-baz';
  final _textController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: GooglePlacesAutoCompleteTextFormField(
          textEditingController: _textController,
          googleAPIKey: _yourGoogleAPIKey,
          maxLines: 1,
          overlayContainer: (child) => Material(
            elevation: 1.0,
            color: Colors.green,
            borderRadius: BorderRadius.circular(12),
            child: child,
          ),
        ),
      ),
    );
  }
}
37
likes
0
points
3.87k
downloads

Publisher

verified publishergowdysoftware.de

Weekly Downloads

A fully customizable Google Places autocomplete text form field for Flutter iOS and Android.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter, rxdart

More

Packages that depend on google_places_autocomplete_text_field