location_picker_flutter 2.1.2 copy "location_picker_flutter: ^2.1.2" to clipboard
location_picker_flutter: ^2.1.2 copied to clipboard

A location picker package that allows the use to pick a location and get the address via GPS, Map or Autocomplete Google Apis.

example/lib/main.dart

import 'package:flutter/material.dart';
// ignore: depend_on_referenced_packages
import 'package:location_picker_flutter/location_picker_flutter.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.white,
          elevation: 0,
          toolbarHeight: 44,
          title: Text("Pick Location"),
        ),
        body: LocationPickerFlutter(
          googleMapsApiKey: "YOUR_API_KEY",
          intialSettings: IntialSettingsModel(
            position: PickedLocation(
              latitude: 12,
              longitude: 80,
              addressLine1: "",
              addressLine2: "",
              landmark: "",
              city: "",
              state: "",
              country: "",
              zipCode: "",
            ),
            zoom: 3,
            showMarker: false,
          ),
          onLocationPasted: (location) => PastedLinkLocation(
            latitude: 0,
            longitue: 0,
            addressLine1: 'Test',
            addressLine2: 'Add',
            city: 'City',
            state: '',
            landmark: '',
            country: '',
            zipcode: '',
          ),
        ),
      ),
    );
  }

  LocationPickerFlutterV1 locationPickerWidget() {
    return LocationPickerFlutterV1(
      googleMapsApiKey: "YOUR_API_KEY",
      intialLocation: InitialSettings(latitude: 13, longitude: 80, zoom: 3),
      initalMarker: PickedLocation(
        latitude: 13,
        longitude: 80,
        addressLine1: "addressLine1",
        addressLine2: "addressLine2",
        landmark: "landmark",
        city: "city",
        state: "state",
        country: "country",
        zipCode: "zipCode",
      ),
    );
  }
}
2
likes
135
points
121
downloads

Publisher

unverified uploader

Weekly Downloads

A location picker package that allows the use to pick a location and get the address via GPS, Map or Autocomplete Google Apis.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_svg, geocoding, geolocator, google_maps_flutter, skeletonizer

More

Packages that depend on location_picker_flutter