AnalyticsSendEventParams.fromJson constructor
AnalyticsSendEventParams.fromJson(
- JsonDecoder jsonDecoder,
- String jsonPath,
- Object? json
)
Implementation
factory AnalyticsSendEventParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
String action;
if (json.containsKey('action')) {
action = jsonDecoder.decodeString('$jsonPath.action', json['action']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'action');
}
return AnalyticsSendEventParams(action);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analytics.sendEvent params', json);
}
}