Package selection guidance compiled from public package information, community data, and project usage.
Flutter Beacon is a cross-platform plugin enabling Bluetooth Low Energy (BLE) beacon scanning and transmission on Android and iOS devices. It supports iBeacon functionality, allowing developers to detect nearby beacons or broadcast beacon signals. The plugin integrates seamlessly with Flutter apps, providing a straightforward API for both discovery and advertising modes. Ideal for proximity-based applications such as indoor navigation, asset tracking, and location-aware services. Compatible with native BLE capabilities on both platforms.
Use cases
Indoor navigation systems
Asset and device tracking
Proximity marketing
Location-based triggers
Smart retail experiences
Key features
iBeacon scanning and transmission
Cross-platform support (Android & iOS)
Simple Flutter API
Real-time beacon detection
Low power consumption
Suitable for
Developers building proximity apps
Apps requiring indoor positioning
Retail and hospitality solutions
IoT device integration
Event-based mobile applications
Considerations
Requires Bluetooth permissions on both platforms
Background operation may be limited by OS restrictions
Battery usage should be monitored during continuous scanning
In order to use beacons related features, apps are required to ask the location permission. It's a two step process:
Declare the permission the app requires in configuration files
Request the permission to the user when app is running (the plugin can handle this automatically)
The needed permissions in iOS is when in use.
For more details about what you can do with each permission, see:
https://developer.apple.com/documentation/corelocation/choosing_the_authorization_level_for_location_services
Permission must be declared in ios/Runner/Info.plist:
<dict><!-- When in use --><key>NSLocationWhenInUseUsageDescription</key><string>Reason why app needs location</string><!-- Always --><!-- for iOS 11 + --><key>NSLocationAlwaysAndWhenInUseUsageDescription</key><string>Reason why app needs location</string><!-- for iOS 9/10 --><key>NSLocationAlwaysUsageDescription</key><string>Reason why app needs location</string><!-- Bluetooth Privacy --><!-- for iOS 13 + --><key>NSBluetoothAlwaysUsageDescription</key><string>Reason why app needs bluetooth</string></dict>
iOS Troubleshooting
Example code works properly only on physical device (bluetooth on simulator is disabled)
How to deploy flutter app on iOS device Instruction
If example code don't works on device (beacons not appear), please make sure that you have enabled Location and Bluetooth (Settings -> Flutter Beacon)
How-to
Ranging APIs are designed as reactive streams.
The first subscription to the stream will start the ranging
Initializing Library
try {
// if you want to manage manual checking about the required permissionsawait flutterBeacon.initializeScanning;
// or if you want to include automatic checking permissionawait flutterBeacon.initializeAndCheckScanning;
} onPlatformExceptioncatch(e) {
// library failed to initialize, check code and message
}
Ranging beacons
final regions = <Region>[];
if (Platform.isIOS) {
// iOS platform, at least set identifier and proximityUUID for region scanning
regions.add(Region(
identifier: 'Apple Airlocate',
proximityUUID: 'E2C56DB5-DFFB-48D2-B060-D0F5A71096E0'));
} else {
// android platform, it can ranging out of beacon that filter all of Proximity UUID
regions.add(Region(identifier: 'com.beacon'));
}
// to start ranging beacons
_streamRanging = flutterBeacon.ranging(regions).listen((RangingResult result) {
// result contains a region and list of beacons found// list can be empty if no matching beacons were found in range
});
// to stop ranging beacons
_streamRanging.cancel();
Monitoring beacons
final regions = <Region>[];
if (Platform.isIOS) {
// iOS platform, at least set identifier and proximityUUID for region scanning
regions.add(Region(
identifier: 'Apple Airlocate',
proximityUUID: 'E2C56DB5-DFFB-48D2-B060-D0F5A71096E0'));
} else {
// Android platform, it can ranging out of beacon that filter all of Proximity UUID
regions.add(Region(identifier: 'com.beacon'));
}
// to start monitoring beacons
_streamMonitoring = flutterBeacon.monitoring(regions).listen((MonitoringResult result) {
// result contains a region, event type and event state
});
// to stop monitoring beacons
_streamMonitoring.cancel();