flutter_background_location_tracker_advanced library
Advanced extension contracts for custom storage, native adapters, export writers, and upload integrations.
Normal applications should import flutter_background_location_tracker.dart.
This library keeps lower-level contracts discoverable without removing the
current main-barrel re-exports during the pre-1.0 compatibility window.
Classes
- AbortTrackRequest
- ActivitySnapshot
- Activity classification captured at a particular instant.
- AdaptiveBatteryDecision
- AdaptiveBatteryObservation
- Coordinate-free inputs supplied by the host/platform integration.
- AdaptiveBatteryPolicy
- Versioned host policy for bounded, local-only adaptive sampling.
- AdaptiveBatteryPolicyEngine
- Deterministic adaptive policy with residence-time and transition-rate hysteresis. It performs no I/O and never changes configuration by itself.
- AdaptiveFidelityBounds
- Host-owned lower bounds. Adaptive policy can be more accurate than these limits, never less accurate.
- AdaptiveTrackingCoordinator
- Applies eligible decisions through the atomic configuration-epoch capability and rolls back through that same durable path.
- BatteryOptimizationState
- Android battery-optimization state, or an unsupported result elsewhere.
- CommandLeaseTrackerAdapter
- Optional adapter capability that fences lifecycle commands across engines.
- ConfigurationEpochRepository
- Optional owner-scoped lookup for immutable point-policy provenance.
- ContinuityTrackRepository
- Optional atomic continuity capability for repositories that support the schema-12 evidence model.
- DeleteTrackRequest
- DerivedGeometryPoint
- A derived coordinate linked to exactly one immutable raw point.
- DerivedGeometryRepository
- Optional owner-scoped persistence capability for derived geometry.
- DerivedGeometryRequest
- Input to an offline derivation. The package ships an EMA implementation; hosts may persist results from another offline or network algorithm through DerivedGeometryRepository.
- DerivedGeometryRun
- Immutable provenance for one post-capture geometry derivation.
- DerivedGeometryService
- Runs optional post-capture derivation without delaying raw point commits.
- DerivedTrackGeometry
- EraseTrackRequest
- ExportFileWriter
- FileSystemExportWriter
- FixQualityDecision
- Versioned canonical decision for one raw native fix.
- FixQualityIssue
- Stable issue codes emitted by the canonical fix-quality policy.
- FixQualityPolicy
- Pure evaluator used as the canonical geometry acceptance policy.
- GapSegmentRepository
- Optional repository capability for an explicit in-session route gap.
- IdempotentTrackCompletionUploader
- Optional extension that gives completion requests a stable outbox key.
- InferredRouteConnector
- Presentation-only straight connector between two captured anchors.
- LegacyGapEvidenceRepository
- Optional audit used to coalesce only proven-safe legacy callback gaps.
- LocationSample
- Raw location and capture evidence received from the native provider.
- ManagedExportDeletionReport
- ManagedExportRecord
- Canonical inventory entry for an artifact created by the package.
- ManagedExportRepository
- Optional two-phase inventory used by V2 export and later scoped erase.
- ManagedTrackExport
- Owner-scoped package-managed export visible to cleanup/privacy workflows.
- MotionEvidenceObservation
- Bounded feature window supplied to the pure motion reducer.
- MotionEvidenceReducer
- Pure, coordinate-free reducer shared by native fixture tests and Dart UI.
- MotionEvidenceSnapshot
- One bounded, coordinate-free motion decision.
- MultiDayTripController
- Additive multi-day Trip lifecycle API.
- MutableConfigurationEpochRepository
- Durable primitives for a pause-fenced runtime configuration switch.
- NativeCommandLease
- A process-local lease bound to one durable tracking session.
- NativeJournalDiagnosticsAdapter
- Optional adapter capability for redacted native journal diagnostics.
- NativePendingLocationPage
- A bounded page of durable native location events.
- NativeProtocolAdapter
- Optional adapter capability for native method-channel negotiation.
- NativeTrackingCapabilities
- Known native capability identifiers.
- NativeTrackingHealthAdapter
- Optional raw native state capability used to build typed health snapshots.
- NativeTrackingProtocol
- Version and capability information negotiated with the native tracker.
- NativeUserActionAdapter
- Optional adapter capability for native notification lifecycle actions.
- OwnerConflictResolutionRequest
- Explicit host confirmation for resolving a redacted foreign live capture.
- OwnerConflictResolutionResult
- OwnerScopedTrackRepository
- Owner-scoped route lookup and retention capability used by the safe facade.
- OwnerScopedUploadOutboxRepository
- Optional accidental cross-account guard for upload discovery.
- OwnerSwitchResult
- Result returned after a successful owner switch.
- PagedNativeLocationAdapter
- Optional adapter capability for bounded native journal draining.
- PaginatedTrackRepository
- Optional bounded route-history capability.
- PendingNativeUserAction
- PendingTrackCommand
- PointAppendResult
- Result of one atomic point/topology/gap transaction.
- PointWriteRequest
- A local cache copy prepared for a host sharing package.
- PreparedTripLeg
- PrivacyTrackRepository
- Durable owner-scoped primitives for additive abort/delete/erase workflows.
- ProcessedRoutePoint
- A processor coordinate linked to an immutable raw source point.
- PublicDownloadsExportWriter
- Writes exports to a user-visible folder.
- QualityDiagnosticsRepository
- Optional privacy-safe quality diagnostics supported by schema 13 stores.
- RawTrackGeometry
- ResolvedTrackingAccuracy
- Fully resolved sampling and validation values for an accuracy profile.
- RouteFormatConverter
- Converts route content between GeoJSON, GPX, and KML.
- RouteGeometryAssembler
- Shared pure topology assembler used by maps and all export paths.
- RouteGeometryBoundaryDecision
- Shared decision for one presentation boundary between source segments.
- RouteGeometryPart
- One presentation part containing existing points in chronological order.
- RouteGeometryProcessor
- Vendor-neutral opt-in contract for road/footpath alignment.
- RouteGeometryProcessorPoint
- One raw anchor supplied to an opt-in geometry processor.
- RouteGeometryProcessorRequest
- Bounded page passed to a host-supplied route processor.
- RouteGeometryProcessorResult
- Result of one bounded processor page.
- RouteGeometryReport
- Counts and materialized geometry produced by one shared assembly pass.
- RouteGeometrySourcePart
- One bounded source segment supplied to RouteGeometryAssembler.
- RouteSpikeAssessment
- Evidence returned for the middle anchor of a three-point route window.
- StagedPermissionAdapter
- Optional adapter capability for one-step, visible-gesture permission prompts.
- StreamingTrackRepository
- Optional owner-scoped, bounded route-data capability.
- Track
- Persisted summary and configuration for one tracked route.
- TrackArtifactActionResult
- TrackArtifactActionStatuses
- TrackArtifactKinds
- TrackAvailableActions
- Computes route-list actions for a selected stored route.
- TrackBundle
- TrackDataSnapshot
- Stable upper bounds shared by every page traversal of one route snapshot.
- TrackDeletionReport
- TrackerAdapter
- TrackErasureReport
- TrackerSettingsAdapter
- Optional adapter capability for opening settings and diagnostics screens.
- TrackerStatus
- Latest native lifecycle, motion, and sampling state.
- TrackExportArtifact
- TrackExportDestination
- A committed V2 destination with one durable access handle.
- TrackExportOperation
- Cancellable V2 export handle.
- TrackExportOptions
- TrackExportProgress
- Progress emitted between bounded export chunks.
- TrackExportRequest
- Request for a bounded V2 export operation.
- TrackExportResult
- TrackExportResultV2
- Result of a V2 export with a share-safe destination abstraction.
- TrackExportService
- TrackExportServiceV2
- Owner-bound, bounded-memory V2 route export service.
- TrackGeometrySelection
- Selects which coordinates a map or export consumes.
- TrackHistoryEvent
- Lightweight notification that route history should be refreshed.
- Tracking
- Low-level route tracking contract implemented by TrackingClient.
- TrackingCapabilityReport
- Native feature availability reported by the active platform implementation.
- TrackingClient
- Default implementation and factory for route tracking controllers.
- TrackingConfig
- Sampling, validation, and battery policy for a tracking session.
- TrackingConfiguration
- Package-level storage and export configuration.
- TrackingConfigurationController
- Additive capability for changing a live route's resolved policy.
- TrackingConfigurationEpoch
- Immutable configuration and policy provenance for a sequence range.
- TrackingConfigurationUpdateOperation
- Durable state used to reconcile a configuration switch after process death.
- TrackingConfigurationUpdateResult
- Result of an atomic, producer-fenced runtime configuration update.
- TrackingContinuityClassifier
- Pure classifier that keeps quality evidence separate from route topology.
- TrackingContinuityDecision
- Versioned topology decision for one accepted-geometry gap.
- TrackingContinuityEvidence
- Immutable evidence consumed by TrackingContinuityClassifier.
- TrackingContinuityGap
- Durable, coordinate-free topology evidence for one observed route gap.
- TrackingController
- Owner-bound facade for normal app integrations.
- TrackingDiagnosticsController
- Additive diagnostics capability implemented by the owner-bound facade.
- TrackingDoctorFinding
- TrackingDoctorReport
- TrackingExportController
- Optional facade capability for V2 export and share preparation.
- TrackingGeometryController
- Additive facade contract for post-capture route geometry.
- TrackingHealthIssue
- A stable, coordinate-free diagnostic finding.
- TrackingHealthSnapshot
- Coordinate-free status for every durable tracking pipeline boundary.
- TrackingLifecycleActions
- Lifecycle commands currently safe for the host UI to show.
- TrackingManagedExportController
- TrackingOwner
- Tenant/application metadata used by explicit start and resume APIs.
- TrackingPermissionState
- Read-only snapshot of platform prerequisites for background tracking.
- TrackingPolicyVersions
- Versions attached to each immutable policy epoch.
- TrackingPrivacyActions
- TrackingPrivacyController
- TrackingPrivacyService
- Owner-bound implementation of additive Abort/Delete/Erase semantics.
- TrackingQualityController
- Coordinate-free quality diagnostics for recorded routes.
- TrackingQualitySummary
- Coordinate-free diagnostics for a Track or multi-day Trip snapshot.
- TrackingReadiness
- Permission/capability readiness snapshot for background tracking.
- TrackingReadinessIssue
- One readiness issue found during a non-prompting preflight check.
- TrackingRecoveryAction
- A stable recovery action code attached to package exceptions.
- TrackingRecoveryActions
- Common recovery actions used by package exceptions.
- TrackingSessionSnapshot
- Replaying, coordinate-safe current tracking session snapshot.
- TrackingSettingsResult
- Result of asking the operating system to open a settings screen.
- TrackingSupportReport
- Sanitized support data with no route/owner IDs, coordinates, filenames, command tokens, or raw native exception details.
- TrackingTripController
- Combined Track and multi-day Trip controller.
- TrackLifecycleResult
- Track plus status snapshot returned by pause and complete operations.
- TrackPage
- One page of route-history summaries.
- TrackPoint
- TrackPointPage
- One deterministic page of persisted route points.
- TrackPointQualityFlag
- TrackPrivacyOperationRecord
- TrackPrivacyOperationStages
- TrackPrivacyOperationTypes
- TrackPrivacyReport
- TrackQuery
- Bounded query for route-history summaries.
- TrackRepository
- TrackScopedNativeDataAdapter
- Optional destructive native-journal capability used by confirmed erase.
- TrackSegment
- TrackSegmentPage
- One deterministic page of route segments.
- TrackSegmentWithPoints
- TrackStartRequest
- Explicit request for creating or recovering a route.
- TrackStartResult
- Result returned by explicit start and recovery APIs.
- TrackTerminalActionReport
- TrackUploadAcknowledgement
- TrackUploadBatch
- TrackUploader
- Trip
- User-visible multi-day journey aggregate.
- TripBundle
- Bounded summary of a Trip and its ordered legs/gap evidence.
- TripCompletionUploader
- Host transport for one immutable, revisioned Trip-completion summary.
- TripCompletionUploadService
- Explicit drain service for the optional combined-Trip completion outbox.
- TripContinueResult
- Result after continuing a suspended or explicitly reopened Trip.
- TripExportResult
- One combined immutable export of every current Trip leg.
- TripExportService
- Combined multi-day Trip exporter using the same geometry/format contract as Track export.
- TripLeg
- Membership and daily lifecycle metadata for one internal Track leg.
- TripLegPage
- Stable page of ordered Trip legs.
- TripLifecycleResult
- Result of End day or terminal Complete Trip.
- TripOperationRecord
- TripPage
- Stable page of Trip summaries ordered newest first.
- TripPrivacyRepository
- Optional destructive capability used by confirmed whole-Trip erasure.
- TripQuery
- Owner-scoped bounded query for user-visible Trips.
- TripRepository
- Optional owner-safe persistence capability for multi-day journeys.
- TripStartRequest
- Request for a new user-visible journey and its first internal Track leg.
- TripStartResult
- Result after the first Trip leg has entered native capture.
- TripUploadOutboxEntry
- Durable final-Trip completion task and acknowledgement receipt.
- TripUploadOutboxLease
- TripUploadOutboxRepository
- Optional durable capability for a revisioned combined-Trip completion.
- UncertaintyAwareSpikeClassifier
- Conservative three-anchor classifier that uses uncertainty and kinematics.
- UncertaintyWeightedRouteSmoother
- Deterministic smoother that corrects only supported middle-point spikes.
- UploadOutboxEntry
- A durable upload task stored alongside its track.
- UploadOutboxLease
- A claimed outbox task. Only leaseOwner may acknowledge or fail it.
- UploadOutboxRepository
- Optional durable-upload capability implemented by the SQLite repository.
Enums
- ActivityEvidenceState
- Freshness of activity evidence relative to the consuming decision.
- AdaptiveBatteryDecisionKind
- AdaptiveBatteryMode
- AdaptiveThermalState
- DerivedGeometryRunStatus
- DerivedRouteMode
- Kind of immutable, post-capture geometry requested by a host application.
- FusedMotionState
- Coordinate-free result produced by the motion-evidence reducer.
- IosTerminationRecoveryMode
- iOS behavior after operating-system process termination.
- LocationPermissionLevel
- Normalized foreground/background location authorization level.
- ManagedExportState
- MockLocationAssessment
- What the operating system reported about mock/simulated location.
- MockLocationPolicy
- How suspected mock or simulated locations should affect route capture.
- MotionEvidenceSource
- Optional native evidence sources used to classify motion.
- MotionFusionMode
- Native sensor sources allowed to supplement activity and GPS evidence.
- MotionState
- Motion gate currently used by native sampling logic.
- MultiDayRoutePresentation
- Persisted presentation preference for a multi-day Trip.
- NativeUserActionType
- OwnerConflictResolutionDisposition
- OwnerSwitchPolicy
- Policy used when a controller is rebound to a different TrackingOwner.
- RouteCaptureIntent
- User-declared route mode used when motion evidence is unavailable.
- RouteGeometryContinuity
- Presentation topology applied without mutating canonical route evidence.
- SamplingProfile
- Native sampling profile currently applied to the provider.
- StaleActivityFallback
- Sampling fallback applied to stale platform activity evidence.
- TrackCommandType
- TrackerLifecycle
- Native capture lifecycle independent of the Flutter widget lifecycle.
- TrackExportFormat
- TrackHistoryChangeKind
- Type of route-history mutation emitted by TrackHistoryEvent.
- TrackingAccuracy
- A predefined sampling and native location-accuracy profile.
- TrackingActivityType
- Normalized motion activity reported for a location session.
- TrackingConfigurationUpdateStage
- TrackingContinuityPolicy
- Fallback used only when continuity evidence is inconclusive.
- TrackingDoctorFindingSeverity
- TrackingFixState
- TrackingGapCause
- Why a meaningful gap exists between route-geometry anchors.
- TrackingGapDistanceTreatment
- How the straight connector associated with a gap affects route distance.
- TrackingGapTreatment
- Whether a gap keeps or changes canonical raw route topology.
- TrackingReadinessAction
- The single next action a host should present before tracking can start.
- TrackingSettingsDestination
- Settings screens that the package can ask the operating system to open.
- TrackOperationType
- TrackQualityRunSeverity
- Severity assigned to a consecutive run of rejected raw fixes.
- TrackRecordRetentionPolicy
- Local database retention mode for completed route history.
- TrackSegmentStatus
- TrackStartDisposition
- How an explicit start/recovery command reached an active route.
- TrackStatus
- Durable lifecycle state of one recorded route.
- TripContinueDisposition
- How an idempotent Continue operation resolved its next leg.
- TripOperationStage
- TripOperationType
- TripStatus
- Lifecycle of one user-visible journey containing one or more Track legs.
- TripUploadOutboxState
- UnknownMotionFallback
- Sampling fallback applied when the fused decision remains unknown.
- UploadOutboxKind
- UploadOutboxState
Extensions
- MultiDayRoutePresentationGeometry on MultiDayRoutePresentation
- Maps a persisted Trip preference to the shared geometry assembler.
- TrackingActivityTypeValue on TrackingActivityType
- Serialization and movement helpers for TrackingActivityType.
Functions
-
availableActionsFor(
Track track) → TrackAvailableActions -
createRouteId(
String identifier, DateTime startedAt) → String - Creates a readable route ID with whitespace normalized and a UTC suffix.
-
providerStateForPermission(
TrackingPermissionState permission) → String -
resolveExportFileName(
{required TrackExportFormat format, required String fallbackFileName, String? requestedFileName}) → String -
sanitizeExportFileName(
String fileName) → String -
trackingActivityTypeFromValue(
Object? raw) → TrackingActivityType - Parses platform activity names into the package's normalized enum.
-
trackingHealthDate(
Object? value) → DateTime?
Typedefs
-
ExportDirectoryProvider
= Future<
Directory> Function() - FlutterBackgroundLocation = TrackingClient
- TrackSummary = Track
- Backward-compatible name for the route summary model.
-
UploadBatchEncodedSize
= int Function(List<
TrackPoint> points)
Exceptions / Errors
- TrackingConfigurationException
- Invalid package or per-route tracking configuration.
- TrackingConflictException
- A lifecycle command conflicts with an existing same-owner route.
- TrackingException
- Base package exception with a stable, machine-readable code.
- TrackingExportException
- A route export, destination, or share preparation operation failed.
- TrackingNativeException
- A native platform operation failed or is not available.
- TrackingNotReadyException
- A tracking command cannot proceed until readiness issues are resolved.
- TrackingOwnershipException
- A lifecycle command would cross a host owner/account boundary.
- TrackingPermissionException
- Error raised when a tracking command lacks required authorization.
- TrackingPermissionStepException
- A native permission step may have partially reached the OS prompt.
- TrackingStorageException
- Canonical route storage or bounded-read operation failed.
- TrackingTripException
- A multi-day Trip lifecycle command failed with a stable conflict code.