पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

location कवर
पैकेज विवरणv10.2.0

location

वास्तविक समय में उपकरण के स्थान तक आसान पहुंच के लिए क्रॉस-प्लेटफ़ॉर्म प्लगइन।

AndroidiOSWebmacOS
30-दिन डाउनलोड
2.3 लाख
लाइक
3.2 हज़ार
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add location

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

location पैकेज एंड्रॉइड, iOS, वेब और macOS पर रियल-टाइम डिवाइस स्थिति के लिए क्रॉस-प्लेटफॉर्म समाधान प्रदान करता है। यह प्लेटफॉर्म के आधार पर एक सुसंगत API के साथ भू-स्थिति कार्यों को सरल बनाता है, जिससे डेवलपर्स को वर्तमान स्थिति प्राप्त करने, स्थिति में बदलाव की निगरानी करने और अनुमतियों को बिना किसी दिक्कत के संभालने में सक्षम बनाता है। उपयोग में आसान बनाने के लिए बनाया गया है, यह प्लेटफॉर्म-विशिष्ट जटिलताओं को छिपाता है जबकि विश्वसनीयता और प्रदर्शन को बनाए रखता है। मानचित्र, ट्रैकिंग या निकटता वाले फीचर्स वाले ऐप्स के लिए आदर्श है।

उपयोग

  • रियल-टाइम स्थान ट्रैकिंग
  • जियोफेंसिंग एंटीग्रेशन
  • मैप-आधारित एप्लिकेशन
  • उपयोगकर्ता स्थान पुनर्प्राप्ति
  • स्थान-जागरूक नोटिफिकेशन
  • यात्रा और नेविगेशन ऐप्स

मुख्य विशेषताएँ

  • प्लेटफॉर्म के अनुकूलता
  • रियल-टाइम स्थान अपडेट
  • अनुमति प्रबंधन
  • सरल API इंटरफ़ेस
  • सभी प्रमुख प्लेटफॉर्म के लिए समर्थन
  • पृष्ठभूमि स्थान एक्सेस

इनके लिए उपयुक्त

  • मोबाइल ऐप विकासकर्ता
  • स्थान-आधारित सेवा ऐप
  • ट्रैकिंग और मैपिंग टूल्स
  • वेब और डेस्कटॉप स्थान एप्लिकेशन
  • सटीक डिवाइस स्थिति की आवश्यकता वाले ऐप्स

विचार योग्य बातें

  • सही अनुमति कॉन्फ़िगरेशन की आवश्यकता है
  • पृष्ठभूमि स्थान बैटरी के जीवन को प्रभावित कर सकता है
  • वेब समर्थन केवल ब्राउज़र जियोलोकेशन तक सीमित है
  • iOS को info.plist में गोपनीयता विवरण की आवश्यकता होती है
  • Android को मैनिफेस्ट में स्थान की अनुमति की आवश्यकता होती है
  • सटीकता उपकरण हार्डवेयर पर निर्भर करती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

📍 Flutter Location

The easiest way to get a device's location in real-time — on every platform Flutter runs.

One simple API for GPS coordinates, live location streams and background tracking on Android, iOS, macOS, Web, Windows and Linux.

pub version pub likes pub points codecov license

📖 Documentation  ·  🌐 Live web demo  ·  📦 pub.dev  ·  💬 Feedback


✨ Why Location?

  • 🌍 Truly cross-platform — the same code runs on all six Flutter targets, no per-platform branching.
  • ⚡ One-line to a fix — await location.getLocation() and you're done.
  • 🔴 Real-time streams — subscribe to onLocationChanged for continuous updates.
  • 🌙 Background tracking — keep receiving locations while your app is backgrounded on Android & iOS.
  • 🎛️ Tunable — pick accuracy, update interval and distance filter to balance precision vs. battery.
  • 🔔 Customizable notification — full control over the Android foreground-service notification.
  • 📊 Rich data — latitude, longitude, altitude, speed, heading, accuracy, mock detection and more.
  • 🛡️ Battle-tested — one of the most-used location plugins in the Flutter ecosystem, maintained since 2017.

📱 Platform support

Feature Android iOS macOS Web Windows Linux
One-time location ✅ ✅ ✅ ✅ ✅ ✅
Location stream ✅ ✅ ✅ ✅ ✅ ✅
Background updates ✅ ✅ — — — —
Permission handling ✅ ✅ ✅ ✅ ✅ ✅

Windows uses Windows.Devices.Geolocation; Linux talks to GeoClue2 over D-Bus. Both require the system location service to be enabled.

Watch the demo on YouTube

🚀 Quick start

Add the package:

dependencies:
  location: ^10.0.0

Get a location:

import 'package:location/location.dart';

final location = Location();

// Make sure the service is on and permission is granted.
if (!await location.serviceEnabled() && !await location.requestService()) return;
if (await location.requestPermission() != PermissionStatus.granted) return;

// One-time fix…
final current = await location.getLocation();
print('${current.latitude}, ${current.longitude}');

// …or a live stream.
location.onLocationChanged.listen((loc) {
  print('Moved to ${loc.latitude}, ${loc.longitude}');
});

That's it. Platform setup (permissions, background mode, sandbox entitlements) and the full API are covered in the package README and the documentation website.

📦 Packages in this repository

Package Description pub.dev
location The plugin you use in your app. pub
location_platform_interface Shared platform interface. pub
location_web Web implementation. pub

🤝 Contributing

Issues and pull requests are very welcome — this plugin is community-maintained and we're always looking for help. Browse the open issues to get started, or open a new one to report a bug or request a feature.

👥 Maintainers

📄 License

Released under the MIT License. © 2017 Guillaume Bernos.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 2 आइटम

  • location_platform_interface^7.0.0
  • location_web^7.0.0

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

रैंकिंग