instance property
CalljmpDevice
get
instance
The default instance of CalljmpDevice to use.
This provides access to the current platform-specific implementation. Defaults to MethodChannelCalljmpDevice which uses Flutter's method channel system to communicate with native platform code.
Example:
final device = CalljmpDevice.instance;
final keyId = await device.appleGenerateAttestationKey();
Implementation
static CalljmpDevice get instance => _instance;
set
instance
(CalljmpDevice instance)
Platform-specific implementations should set this with their own platform-specific class that extends CalljmpDevice when they register themselves.
The implementation must pass token verification to ensure it properly extends CalljmpDevice and follows the platform interface contract.
Example:
CalljmpDevice.instance = MyCustomCalljmpDevice();
Throws AssertionError if the instance doesn't pass token verification.
Implementation
static set instance(CalljmpDevice instance) {
PlatformInterface.verifyToken(instance, _token);
_instance = instance;
}