get_my_location 2.1.0
get_my_location: ^2.1.0 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.
Get My Location ๐ #
A Flutter widget that fetches and displays the user's current location with address lookup, loading and error states, and a refresh button.
โจ Features #
- ๐ Get latitude/longitude with accuracy
- ๐ Reverse geocoding for address lookup
- โณ Builtโin loading and error UI
- ๐ Oneโtap refresh button
๐ Installation #
dependencies:
get_my_location: ^2.0.3
๐งฉ Basic usage #
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 const MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Get My Location')),
body: Padding(
padding: EdgeInsets.all(16),
child: Center(
child: LocationGetter(),
),
),
),
);
}
}