rubric_builder 0.1.1
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.
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
RubricDraftmodel - ðŠķ 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