rubric_builder 0.1.1 copy "rubric_builder: ^0.1.1" to clipboard
rubric_builder: ^0.1.1 copied to clipboard

A Flutter widget for authoring weighted grading rubrics, with a live points total and a clean, serializable, controller-free data model.

📝 rubric_builder #

Author weighted grading rubrics in Flutter — with a live points total #

A widget to add, edit and remove rubric criteria, backed by a clean, immutable, controller-free data model.

pub package pub points likes CI license: MIT


The widget owns its TextEditingControllers internally and only ever hands you immutable RubricDraft values — so there are no leaked controllers and your state stays serializable.

Features #

  • ➕ Add / ✏ïļ edit / 🗑ïļ remove rubric criteria
  • ðŸ§Ū Live points total that updates as you type
  • ✅ Per-criterion "auto-graded" toggle (mark some for manual grading)
  • 🧊 Immutable, controller-free, JSON-serializable RubricDraft model
  • ðŸŠķ Zero non-Flutter dependencies

Install #

dependencies:
  rubric_builder: ^0.1.1

or flutter pub add rubric_builder.

Usage #

import 'package:rubric_builder/rubric_builder.dart';

List<RubricDraft> rubrics = const [
  RubricDraft(description: 'Correct answer', requirement: 'Final value is right', points: 5),
  RubricDraft(description: 'Shows working',  requirement: 'Steps are shown',       points: 3),
];

RubricBuilder(
  initial: rubrics,
  onChanged: (updated) => setState(() => rubrics = updated),
);

The RubricDraft model is JSON-serializable and has value equality:

final json = rubric.toJson();
final back = RubricDraft.fromJson(json);   // == rubric
final total = RubricDraft.total(rubrics);  // sum of points
Customisation options
RubricBuilder(
  initial: rubrics,
  onChanged: (v) => ...,
  addButtonLabel: 'Add criterion', // button text
  showAutoGraded: true,            // show the per-row auto-graded checkbox
  showTotal: true,                 // show the running total header
);

Pairs well with #

Part of the Flutter Grading Toolkit: author rubrics here, then grade answers with ai_rubric_grader — the field names line up.

Contributing #

Issues and PRs welcome. Run flutter test before submitting.

License #

MIT ÂĐ 2026 Muhammad Ali

0
likes
160
points
7
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter widget for authoring weighted grading rubrics, with a live points total and a clean, serializable, controller-free data model.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on rubric_builder