LivenessSession.fromJson constructor

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

Implementation

factory LivenessSession.fromJson(Map<String, dynamic> json) {
  final timestamp = json['server_time'] as int;
  return LivenessSession(
    sessionId: json['session_id'] ?? '',
    credentials: Credentials.fromJson(json['credentials'] ?? {}),
    serverTime: DateTime.fromMillisecondsSinceEpoch(timestamp),
  );
}