SimliClientConfig.fromJson constructor

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

Factory constructor for creating an instance from JSON if needed.

Implementation

factory SimliClientConfig.fromJson(Map<String, dynamic> json) {
  return SimliClientConfig(
    apiKey: json['apiKey'] as String,
    faceId: json['faceID'] as String,
    handleSilence: json['handleSilence'] as bool,
    maxSessionLength: json['maxSessionLength'] as int,
    maxIdleTime: json['maxIdleTime'] as int,
    syncAudio: json['syncAudio'] as bool,
    videoReferenceUrl:
        json['videoReferenceUrl'] as String, // added videoReferenceUrl
    isJPG: json['isJPG'] as bool? ?? true, // added isJPG
  );
}