get_my_location 2.0.2 copy "get_my_location: ^2.0.2" to clipboard
get_my_location: ^2.0.2 copied to clipboard

A Flutter package to easily fetch and display device location with automatic permission handling. Perfect for apps needing quick GPS access with customizable UI states.

example/lib/main.dart

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

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Location Example')),
        body: LocationGetter(
          onLocationFetched: (location) {
            print(
                'Location fetched: ${location.latitude}, ${location.longitude}');
            print("Address: ${location.address}");
          },
          showRefreshButton: true,
          refreshButtonPadding: const EdgeInsets.all(20),
        ),
      ),
    );
  }
}
3
likes
0
points
70
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

A Flutter package to easily fetch and display device location with automatic permission handling. Perfect for apps needing quick GPS access with customizable UI states.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, geocoding, geolocator, permission_handler, provider

More

Packages that depend on get_my_location