SdkConfiguration.fromJson constructor
SdkConfiguration.fromJson(
- Map<String, dynamic> json
)
Implementation
factory SdkConfiguration.fromJson(Map<String, dynamic> json) =>
SdkConfiguration(
licenseKey: json["licenseKey"] as String,
loggingEnabled: json.containsKey("loggingEnabled")
? (json["loggingEnabled"] as bool)
: false,
enableNativeLogging: json.containsKey("enableNativeLogging")
? (json["enableNativeLogging"] as bool)
: false,
storageBaseDirectory: json.containsKey("storageBaseDirectory")
? (json["storageBaseDirectory"] != null
? json["storageBaseDirectory"] as String
: null)
: null,
fileEncryptionMode: json.containsKey("fileEncryptionMode")
? (json["fileEncryptionMode"] != null
? FileEncryptionMode.values
.asNameMap()[json["fileEncryptionMode"] as String]
: null)
: null,
fileEncryptionPassword: json.containsKey("fileEncryptionPassword")
? (json["fileEncryptionPassword"] != null
? json["fileEncryptionPassword"] as String
: null)
: null,
performanceHintApi: json.containsKey("performanceHintApi")
? (json["performanceHintApi"] as bool)
: true,
allowGpuAcceleration: json.containsKey("allowGpuAcceleration")
? (json["allowGpuAcceleration"] as bool)
: true,
allowXnnpackAcceleration: json.containsKey("allowXnnpackAcceleration")
? (json["allowXnnpackAcceleration"] as bool)
: true,
);