FaceAuthenticatorEvent.fromMap constructor
FaceAuthenticatorEvent.fromMap(
- Map map
Implementation
factory FaceAuthenticatorEvent.fromMap(Map map) {
switch (map['event']) {
case 'connecting':
return const FaceAuthenticatorEventConnecting();
case 'connected':
return const FaceAuthenticatorEventConnected();
case 'validating':
return const FaceAuthenticatorEventConnecting();
case 'validated':
return const FaceAuthenticatorEventConnected();
case 'canceled':
return const FaceAuthenticatorEventClosed();
case 'success':
return new FaceAuthenticatorEventSuccess(map['signedResponse']);
case 'error':
return new FaceAuthenticatorEventFailure(
errorType: map["errorType"],
errorDescription: map["errorDescription"]);
}
throw Exception('Invalid event');
}