verify method
Ensures that the platform instance was constructed with a non-const
token
that matches the provided token and throws AssertionError if not.
This is used to ensure that implementers are using extends
rather than
implements
.
Subclasses of MockPlatformInterfaceMixin
are assumed to be valid in debug
builds.
This is implemented as a static method so that it cannot be overridden
with noSuchMethod
.
Implementation
@override
Future<bool> verify(
Uint8List payload,
Uint8List publicKey,
Uint8List signature,
) async {
final result = await methodChannel.invokeMethod<bool>(
Methods.verify,
{
'payload': payload,
'publicKey': publicKey,
'signature': signature,
},
);
return result ?? false;
}