MethodChannelTrustPinSDK class

Default platform implementation backed by a Flutter method channel.

Most apps should use TrustPin rather than this type directly.

Inheritance

Constructors

MethodChannelTrustPinSDK.new()

Properties

eventChannel → EventChannel
Event channel carrying pin-validation verdicts from the native SDK's global validation listener.
final
hashCode → int
The hash code for this object.
no setterinherited
logEventChannel → EventChannel
Event channel carrying SDK log messages from the native SDK's global log sink.
final
logEvents → Stream<Map<Object?, Object?>>
A broadcast stream of raw SDK log-message maps produced by the native SDK's global log sink.
no setteroverride
methodChannel → MethodChannel
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
validationEvents → Stream<Map<Object?, Object?>>
A broadcast stream of raw pin-validation verdict maps produced by the native SDK's global validation listener.
no setteroverride

Methods

awaitConfiguration({int? timeoutMs, String? instanceId}) → Future<void>
Waits until the pinning configuration has been fetched, signature- verified, and accepted by the SDK's integrity check — the explicit fail-closed gate that complements the now non-blocking setup.
override
fetchCertificate(String host, {int port = 443, int? timeoutMs, String? instanceId}) → Future<String>
Fetches the TLS leaf certificate from host as a PEM string.
override
isConfigurationLoaded({String? instanceId}) → Future<bool>
Returns true when a validated pinning payload is cached and usable without a new fetch. Pure state read — never triggers a fetch or blocks.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLogLevel(String logLevel, {String? instanceId}) → Future<void>
Sets the logging verbosity level.
override
setup(String organizationId, String projectId, String publicKey, {Uri? configurationURL, String mode = 'strict', String? instanceId, String? embeddedConfigurationFile}) → Future<void>
Initializes the TrustPin SDK with the given credentials.
override
setupWithNativeBundle({String? iosFileName, String? androidFileName, String? macosFileName, String? instanceId}) → Future<void>
Initializes the TrustPin SDK by loading credentials from a platform bundle file at the native layer. The Dart side never reads or parses the file; iOS/macOS read a Plist via TrustPinConfiguration.fromPlist, Android reads a JSON asset via TrustPinConfiguration.fromAssets.
override
toString() → String
A string representation of this object.
inherited
validateConnection(String host, {int port = 443, int? timeoutMs, String? instanceId}) → Future<void>
Atomically validates that host:port presents a certificate matching the configured pins. The platform composes fetchCertificate and verify inside a single channel call, so the certificate never enters the Dart isolate.
override
verify(String domain, String certificate, {String? instanceId}) → Future<void>
Verifies a PEM certificate against configured pins for domain.
override

Operators

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