renderSimpleSectionSummary function

String renderSimpleSectionSummary({
  1. required String title,
  2. required String? description,
  3. required int grantedPoints,
  4. required int maxPoints,
})

Renders a summary block for sections that can have only a single issue.

Implementation

String renderSimpleSectionSummary({
  required String title,
  required String? description,
  required int grantedPoints,
  required int maxPoints,
}) {
  return _makeSummary([
    Subsection(
      title,
      [if (description != null) Issue(description)],
      grantedPoints,
      maxPoints,
      maxPoints == grantedPoints
          ? ReportStatus.passed
          : grantedPoints == 0
              ? ReportStatus.failed
              : ReportStatus.partial,
    )
  ], basePath: null);
}