Skip to main content

easy_place_picker_plus 1.0.0 copy "easy_place_picker_plus: ^1.0.0" to clipboard
easy_place_picker_plus: ^1.0.0 copied to clipboard

A customizable Google Maps place picker with autocomplete, camera selection, location permissions and selected-place details.

example/lib/main.dart

import 'package:material_ui/material_ui.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:easy_place_picker_plus/easy_place_picker_plus.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    const apiKey = String.fromEnvironment('GOOGLE_MAPS_API_KEY');
    if (apiKey.isEmpty) {
      return const Scaffold(
        body: Center(
          child: Text(
            'Configure Google Maps, then supply GOOGLE_MAPS_API_KEY with --dart-define. See example/README.md.',
          ),
        ),
      );
    }
    return EasyPlacePicker(
      initialPosition: LatLng(25.32134, 21.241421),
      googleApiKey: apiKey,
      mapTypes: MapType.values,
      pinBuilder: (_, _, zoom) {
        return Text('$zoom');
      },
      selectedPlaceWidgetBuilder: (_, _, _, _, zoom) {
        return Container(color: Colors.red);
      },
    );
  }
}
1
likes
150
points
86
downloads

Documentation

API reference

Publisher

verified publishereasyhour.app

Weekly Downloads

A customizable Google Maps place picker with autocomplete, camera selection, location permissions and selected-place details.

Repository (GitHub)
View/report issues

Topics

#google-maps #location #place-picker

License

Apache-2.0 (license)

Dependencies

cupertino_ui, flutter, flutter_google_maps_webservices, geolocator, google_api_headers, google_maps_flutter, http, location, material_ui, permission_handler, provider, uuid

More

Packages that depend on easy_place_picker_plus