LocusInterface class abstract

Contract for Locus implementations (method-channel or mock).

Implementers

Constructors

LocusInterface()

Properties

activityStream Stream<Activity>
no setter
adaptiveTrackingConfig AdaptiveTrackingConfig?
no setter
connectivityStream Stream<ConnectivityChangeEvent>
no setter
currentTrackingProfile TrackingProfile?
no setter
enabledStream Stream<bool>
no setter
errorRecoveryManager ErrorRecoveryManager?
no setter
errorStream Stream<LocusError>?
no setter
events Stream<GeolocationEvent>
no setter
geofenceStream Stream<GeofenceEvent>
no setter
hashCode int
The hash code for this object.
no setterinherited
heartbeatStream Stream<Location>
no setter
httpStream Stream<HttpEvent>
no setter
isForeground bool
no setter
isSignificantChangeMonitoringActive bool
no setter
locationStream Stream<Location>
no setter
motionChangeStream Stream<Location>
no setter
polygonGeofenceEvents Stream<PolygonGeofenceEvent>
no setter
powerSaveStream Stream<bool>
no setter
powerStateStream Stream<PowerStateChangeEvent>
no setter
privacyZoneEvents Stream<PrivacyZoneEvent>
Stream of privacy zone change events.
no setter
providerStream Stream<ProviderChangeEvent>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
significantChangeStream Stream<SignificantChangeEvent>?
no setter
spoofDetectionConfig SpoofDetectionConfig?
no setter
tripEvents Stream<TripEvent>
no setter
workflowEvents Stream<GeofenceWorkflowEvent>
no setter

Methods

addGeofence(Geofence geofence) Future<bool>
addGeofences(List<Geofence> geofences) Future<bool>
addPolygonGeofence(PolygonGeofence polygon) Future<bool>
addPolygonGeofences(List<PolygonGeofence> polygons) Future<int>
addPrivacyZone(PrivacyZone zone) Future<void>
Adds a privacy zone where location data will be obfuscated or excluded.
addPrivacyZones(List<PrivacyZone> zones) Future<void>
Adds multiple privacy zones.
analyzeForSpoofing(Location location, {bool? isMockProvider}) SpoofDetectionEvent?
applyRemoteCommand(RemoteCommand command) Future<bool>
calculateAdaptiveSettings() Future<AdaptiveSettings>
changePace(bool isMoving) Future<bool>
clearGeofenceWorkflows() → void
clearHeadersCallback() → void
clearQueue() Future<void>
clearSyncBodyBuilder() → void
Clears the sync body builder callback.
clearTrackingProfiles() → void
destroy() Future<void>
destroyLocations() Future<bool>
enqueue(JsonMap payload, {String? type, String? idempotencyKey}) Future<String>
estimateBatteryRunway() Future<BatteryRunway>
evaluateSyncPolicy({required SyncPolicy policy}) Future<SyncDecision>
geofenceExists(String identifier) Future<bool>
getBatteryStats() Future<BatteryStats>
getCurrentPosition({int? samples, int? timeout, int? maximumAge, bool? persist, int? desiredAccuracy, JsonMap? extras}) Future<Location>
getDiagnostics() Future<DiagnosticsSnapshot>
getGeofence(String identifier) Future<Geofence?>
getGeofences() Future<List<Geofence>>
getLocations({int? limit}) Future<List<Location>>
getLocationSummary({DateTime? date, LocationQuery? query}) Future<LocationSummary>
getLog() Future<List<LogEntry>>
getPolygonGeofence(String identifier) Future<PolygonGeofence?>
getPolygonGeofences() Future<List<PolygonGeofence>>
getPowerState() Future<PowerState>
getPrivacyZone(String identifier) Future<PrivacyZone?>
Gets a privacy zone by identifier.
getPrivacyZones() Future<List<PrivacyZone>>
Gets all registered privacy zones.
getQueue({int? limit}) Future<List<QueueItem>>
getState() Future<GeolocationState>
getTripState() TripState?
getWorkflowState(String workflowId) GeofenceWorkflowState?
handleError(LocusError error) Future<RecoveryAction>
isInActiveGeofence() Future<bool>
isTracking() Future<bool>
locationAnomalies({LocationAnomalyConfig config = const LocationAnomalyConfig()}) Stream<LocationAnomaly>
locationQuality({LocationQualityConfig config = const LocationQualityConfig()}) Stream<LocationQuality>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onActivityChange(void callback(Activity), {Function? onError}) StreamSubscription<Activity>
onConnectivityChange(void callback(ConnectivityChangeEvent), {Function? onError}) StreamSubscription<ConnectivityChangeEvent>
onEnabledChange(void callback(bool), {Function? onError}) StreamSubscription<bool>
onGeofence(void callback(GeofenceEvent), {Function? onError}) StreamSubscription<GeofenceEvent>
onGeofencesChange(void callback(dynamic), {Function? onError}) StreamSubscription
onHeartbeat(void callback(Location), {Function? onError}) StreamSubscription<Location>
onHttp(void callback(HttpEvent), {Function? onError}) StreamSubscription<HttpEvent>
onLocation(void callback(Location), {Function? onError}) StreamSubscription<Location>
onLocationAnomaly(void callback(LocationAnomaly anomaly), {LocationAnomalyConfig config = const LocationAnomalyConfig(), Function? onError}) StreamSubscription<LocationAnomaly>
onLocationQuality(void callback(LocationQuality quality), {LocationQualityConfig config = const LocationQualityConfig(), Function? onError}) StreamSubscription<LocationQuality>
onMotionChange(void callback(Location), {Function? onError}) StreamSubscription<Location>
onNotificationAction(void callback(String), {Function? onError}) StreamSubscription<String>
onPowerSaveChange(void callback(bool), {Function? onError}) StreamSubscription<bool>
onPowerStateChangeWithObj(void callback(PowerStateChangeEvent event), {Function? onError}) StreamSubscription<PowerStateChangeEvent>
onProviderChange(void callback(ProviderChangeEvent), {Function? onError}) StreamSubscription<ProviderChangeEvent>
onSchedule(void callback(Location), {Function? onError}) StreamSubscription<Location>
onTripEvent(void callback(TripEvent event), {Function? onError}) StreamSubscription<TripEvent>
onWorkflowEvent(void callback(GeofenceWorkflowEvent event), {Function? onError}) StreamSubscription<GeofenceWorkflowEvent>
polygonGeofenceExists(String identifier) Future<bool>
queryLocations(LocationQuery query) Future<List<Location>>
ready(Config config, {bool skipValidation = false}) Future<GeolocationState>
recordBenchmarkLocationUpdate({double? accuracy}) → void
recordBenchmarkSync() → void
refreshHeaders() Future<void>
registerGeofenceWorkflows(List<GeofenceWorkflow> workflows) → void
registerHeadlessSyncBodyBuilder(Future<JsonMap> builder(SyncBodyContext context)) Future<bool>
Registers a headless-compatible sync body builder.
registerHeadlessTask(HeadlessEventCallback callback) Future<bool>
removeAllPolygonGeofences() Future<void>
removeAllPrivacyZones() Future<void>
Removes all privacy zones.
removeGeofence(String identifier) Future<bool>
removeGeofences() Future<bool>
removePolygonGeofence(String identifier) Future<bool>
removePrivacyZone(String identifier) Future<bool>
Removes a privacy zone by identifier.
requestPermission() Future<bool>
reset(Config config) Future<void>
resumeSync() Future<bool>
setAdaptiveTracking(AdaptiveTrackingConfig config) Future<void>
setConfig(Config config) Future<void>
setErrorHandler(ErrorRecoveryConfig config) → void
setHeadersCallback(Future<Map<String, String>> callback()?) → void
setOdometer(double value) Future<double>
setPrivacyZoneEnabled(String identifier, bool enabled) Future<bool>
Enables or disables a privacy zone.
setSpoofDetection(SpoofDetectionConfig config) Future<void>
setSyncBodyBuilder(SyncBodyBuilder? builder) → void
Sets a callback to build custom HTTP sync body.
setSyncPolicy(SyncPolicy policy) Future<void>
setTrackingProfile(TrackingProfile profile) Future<void>
setTrackingProfiles(Map<TrackingProfile, Config> profiles, {TrackingProfile? initialProfile, List<TrackingProfileRule> rules = const [], bool enableAutomation = false}) Future<void>
start() Future<GeolocationState>
startBackgroundTask() Future<int>
startBatteryBenchmark() Future<void>
startGeofences() Future<bool>
startLifecycleObserving() → void
startSchedule() Future<bool>
startSignificantChangeMonitoring([SignificantChangeConfig config = const SignificantChangeConfig()]) Future<void>
startTrackingAutomation() → void
startTrip(TripConfig config) Future<void>
stop() Future<GeolocationState>
stopBackgroundTask(int taskId) Future<void>
stopBatteryBenchmark() Future<BenchmarkResult?>
stopGeofenceWorkflows() → void
stopLifecycleObserving() → void
stopSchedule() Future<bool>
stopSignificantChangeMonitoring() Future<void>
stopTrackingAutomation() → void
stopTrip() TripSummary?
sync() Future<bool>
syncQueue({int? limit}) Future<int>
toString() String
A string representation of this object.
inherited

Operators

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