LivenessDetectionCooldown.fromJson constructor

LivenessDetectionCooldown.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory LivenessDetectionCooldown.fromJson(Map<String, dynamic> json) {
  return LivenessDetectionCooldown(
    failedAttempts: json['failedAttempts'] ?? 0,
    cooldownEndTime: json['cooldownEndTime'] != null
        ? DateTime.fromMillisecondsSinceEpoch(json['cooldownEndTime'])
        : null,
    isInCooldown: json['isInCooldown'] ?? false,
  );
}