isConfigurationLoaded property
Whether a validated pinning payload is currently cached and usable by verify / validateConnection without a new fetch.
Pure state read — never triggers a fetch and never blocks. Use
awaitConfiguration to actively wait for a configuration. A true
result reflects the moment of the read; a previously loaded
configuration can expire if it cannot be refreshed for an extended
period.
if (await TrustPin.shared.isConfigurationLoaded) {
// Safe to make pinned requests without an initial network wait.
}
Implementation
Future<bool> get isConfigurationLoaded async {
try {
return await TrustPinSDKPlatform.instance
.isConfigurationLoaded(instanceId: _instanceId);
} catch (e) {
throw TrustPinException.fromPlatformException(e);
}
}