FaceLivenessEvent.fromMap constructor
FaceLivenessEvent.fromMap(
- Map map
Implementation
factory FaceLivenessEvent.fromMap(Map map) {
switch (map['event']) {
case 'connecting':
return const FaceLivenessEventConnecting();
case 'connected':
return const FaceLivenessEventConnected();
case 'validating':
return const FaceLivenessEventConnecting();
case 'validated':
return const FaceLivenessEventConnected();
case 'canceled':
return const FaceLivenessEventClosed();
case 'success':
return new FaceLivenessEventSuccess(map['signedResponse']);
case 'error':
return new FaceLivenessEventFailure(
errorType: map["errorType"],
errorDescription: map["errorDescription"]);
}
throw Exception('Invalid event');
}