AnalyticsIsEnabledResult.fromJson constructor
AnalyticsIsEnabledResult.fromJson(
- JsonDecoder jsonDecoder,
- String jsonPath,
- Object? json
)
Implementation
factory AnalyticsIsEnabledResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
bool enabled;
if (json.containsKey('enabled')) {
enabled = jsonDecoder.decodeBool('$jsonPath.enabled', json['enabled']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'enabled');
}
return AnalyticsIsEnabledResult(enabled);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analytics.isEnabled result', json);
}
}