MethodChannelLiveLocation class

MethodChannel implementation of LiveLocationPlatform.

This uses platform channels to communicate with native code on Android and iOS.

Inheritance

Constructors

MethodChannelLiveLocation()

Properties

backgroundEventChannel → EventChannel
The EventChannel for background location updates.
final
foregroundEventChannel → EventChannel
The EventChannel for foreground location updates.
final
hashCode → int
The hash code for this object.
no setterinherited
methodChannel → MethodChannel
The MethodChannel used for communication with native code.
final
onBackgroundLocation ↔ void Function(LocationUpdate)?
Invoked by the platform channel layer when a background location arrives.
getter/setter pairinherited
onError ↔ void Function(LocationException)?
Invoked by the platform channel layer when a native error occurs during an active tracking session (e.g. permission revoked, location unavailable).
getter/setter pairinherited
onForegroundLocation ↔ void Function(LocationUpdate)?
Invoked by the platform channel layer when a foreground location arrives.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkLocationServiceEnabled() → Future<bool>
Returns true if the device's location services are currently enabled.
override
checkPermission() → Future<LocationPermissionStatus>
Returns the current location permission status without prompting the user.
override
dispose() → Future<void>
Disposes the platform-specific resources.
override
initialize({required LocationConfig config}) → Future<void>
Initializes the platform-specific implementation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onStreamCancelled() → void
Called when all listeners unsubscribe from the location stream.
override
onStreamListened() → void
Called when a listener subscribes to the location stream.
override
requestPermission() → Future<LocationPermissionStatus>
Requests location permission from the user.
override
startNativeTracking(LocationConfig config) → Future<void>
Starts native location tracking with the given configuration.
override
stopNativeTracking() → Future<void>
Stops native location tracking.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited