ErrorResponseEvent.fromJson constructor

ErrorResponseEvent.fromJson(
  1. dynamic eventData
)

Implementation

factory ErrorResponseEvent.fromJson(dynamic eventData) {
  return ErrorResponseEvent(
    type: eventData['type'] != null
        ? eventData['type'].toString().toErrorResponseState()
        : ErrorResponseState.none,
    from: eventData['from'] ?? '',
    error: eventData['exception'] ?? '',
  );
}