ProviderChangeEvent class
Event fired when the location provider state changes.
Reports whether GPS/network providers are enabled, the authorization status, and accuracy authorization.
- Annotations
Constructors
- ProviderChangeEvent({required bool enabled, required AuthorizationStatus status, bool gps = false, bool network = false, AccuracyAuthorization accuracyAuthorization = AccuracyAuthorization.full, bool mockLocationsDetected = false, bool gpsFallback = false})
-
Creates a new ProviderChangeEvent.
const
-
ProviderChangeEvent.fromMap(Map<
String, Object?> map) -
Creates a ProviderChangeEvent from a platform map.
factory
Properties
- accuracyAuthorization → AccuracyAuthorization
-
The accuracy authorization (iOS 14+). On Android, always AccuracyAuthorization.full.
final
- enabled → bool
-
Whether location services are globally enabled on the device.
final
- gps → bool
-
Whether GPS provider is enabled (Android only).
final
- gpsFallback → bool
-
Whether the location engine has auto-downgraded to Wi-Fi/cell
positioning because the GPS hardware provider is disabled.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- mockLocationsDetected → bool
-
Whether mock/spoofed locations have been detected.
final
- network → bool
-
Whether network provider is enabled (Android only).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → AuthorizationStatus
-
The current authorization status.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> - Serializes to a map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override