Declare one schema; keyed_form generates the typed field refs, so each widget listens to its own slice of state — at 250 fields, across list reorders, with no string keys. Form logic stays plain Dart you can test without a widget tree.
One schema file; the generator does the rest; your widgets stay plain Flutter. The demo runs this exact schema and controller — submit it empty.
@keyedSchemalibrary;
import'package:keyed_form_schema/keyed_form_schema.dart';
part'login_schema.kfg.dart';
final _loginSchema = ks.object({
'email': ks
.string(error: .text('Enter your email'))
.email(error: .text('That does not look like an email')),
'password': ks
.string(error: .text('Enter your password'))
.min(8, error: .text('At least 8 characters')),
});
A ready-made Agent Skill teaches your coding agent the schema DSL, field refs, dynamic lists and submit flow — so "add a list of stops with a required city" comes out idiomatic on the first try. Works with any agent that supports Agent Skills.