toJson method

  1. @override
Map<String, Object?> toJson()
override

Serializes this as a JSON object.

Implementation

@override
Map<String, Object?> toJson() => {
      'message': message,
      if (recoverySuggestion != null)
        'recoverySuggestion': recoverySuggestion,
      if (underlyingException != null)
        'underlyingException': underlyingException.toString(),
    };