Issue constructor

Issue({
  1. String? severity,
  2. String? code,
  3. String? diagnostics,
})

Constructs a new Issue with an optional severity, code, and diagnostics.

Implementation

Issue({
  String? severity,
  String? code,
  String? diagnostics,
}) : this.fromJson(
        JsonObject({
          if (severity != null) severityField.name: JsonString(severity),
          if (code != null) codeField.name: JsonString(code),
          if (diagnostics != null)
            diagnosticsField.name: JsonString(diagnostics),
        }),
      );