AttestationConfig class
Enterprise — Device integrity attestation configuration.
When enabled, the plugin generates a signed attestation token from the device's hardware-backed security module. The token proves the location data came from a genuine, non-rooted/jailbroken device and can be sent alongside HTTP sync payloads for server-side verification.
Trust Layers (Cumulative)
- Mock detection (existing) — Rejects spoofed GPS coordinates.
- Device attestation (this feature) — Proves the device hardware/software is genuine.
- Audit trail (existing) — Proves the location chain hasn't been tampered with.
Platform Support
- Android: Google Play Integrity API (replaces deprecated SafetyNet).
- iOS: App Attest (iOS 14+) with DeviceCheck (iOS 11+) fallback.
- Web: Not supported —
getAttestationToken()returnsnull.
Rate Limits
Google Play Integrity allows ~10,000 requests/day (free tier). The default 1-hour refresh yields 24 requests/day per device.
Config(
attestation: AttestationConfig(
enabled: true,
refreshInterval: 3600,
),
)
- Annotations
Constructors
- AttestationConfig({bool? enabled, int? refreshInterval, @Deprecated('Never implemented — no platform reads this value and the token is not ' 'sent anywhere for verification. Verify it on your backend instead. ' 'Will be removed in a future major version (#304).') String? verificationUrl})
-
Creates a new AttestationConfig.
Omitting a parameter leaves it unset: the getter reports the documented
default, and toMap/toTlConfig skip the field so a partial
setConfig()does not overwrite the persisted value (#321).const -
AttestationConfig.fromMap(Map<
String, Object?> map) -
Creates an AttestationConfig from a map.
factory
Properties
- enabled → bool
-
Enable device attestation.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- refreshInterval → int
-
How often to refresh the attestation token (seconds).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- verificationUrl → String?
-
Server URL to verify the attestation token (optional).
final
Methods
-
mergedWith(
AttestationConfig other) → AttestationConfig -
Applies every field
otherexplicitly supplied on top of this one (#321). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolved(
) → AttestationConfig -
Returns this config with every field pinned to its effective value, for
the complete baseline
ready()sends (#321). -
toMap(
) → Map< String, Object?> - Serializes to a map, omitting fields that were never supplied (#321).
-
toString(
) → String -
A string representation of this object.
override
-
toTlConfig(
) → TlAttestationConfig -
Converts to Pigeon
TlAttestationConfig.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override