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

A flutter plugin helps to search or pick location picker from map. It is completely free and easy to use.

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_google_location_picker/flutter_google_location_picker.dart';
import 'package:flutter_google_location_picker/model/lat_lng_model.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Google Map Picker',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const MyHomePage(title: 'Flutter Google Map Picker'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final String title;

  const MyHomePage({Key? key, required this.title}) : super(key: key);
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: Text(widget.title)),
        body: FlutterGoogleLocationPicker(
            center: LatLong(latitude: 33, longitude: -81),
            showZoomButtons: true,
            onPicked: (pickedData) {
              if (kDebugMode) {
                print(pickedData.latLong.latitude);
                print(pickedData.latLong.longitude);
                print(pickedData.address);
              }
            }));
  }
}
4
likes
120
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plugin helps to search or pick location picker from map. It is completely free and easy to use.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

connectivity_plus, flutter, flutter_map, http, latlong2

More

Packages that depend on flutter_google_location_picker