rubric_builder

pub package license

A Flutter widget for authoring weighted grading rubrics — add, edit and remove criteria with a live points total — 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.

Install

dependencies:
  rubric_builder: ^0.1.0

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),
);

RubricDraft is JSON-serializable and has value equality:

final json = rubric.toJson();
final back = RubricDraft.fromJson(json);
final total = RubricDraft.total(rubrics); // sum of points

Pairs naturally with ai_rubric_grader: author rubrics here, grade answers there.

License

MIT

Libraries

rubric_builder
A Flutter widget + model for authoring weighted grading rubrics.