LoggingConfig.fromJson constructor
Creates a LoggingConfig instance from a JSON map.
This factory constructor parses a JSON map and creates a corresponding LoggingConfig object. It expects the JSON map to contain the keys 'enableLogging' and 'logLevel'.
Example JSON:
{
"enableLogging": true,
"logLevel": "INFO"
}
Throws a TypeError if the provided JSON values are not of the expected types.
Implementation
factory LoggingConfig.fromJson(Map<String, dynamic> json) {
return LoggingConfig(
enableLogging: json['enableLogging'] as bool,
logLevel: json['logLevel'] as String,
);
}