Riverpod's two build() signatures bit my Flutter code generator

작성자

카테고리:

← 피드로
DEV Community · A G · 2026-08-04 개발(SW)

A G

Source: https://github.com/carlosge492/app-generation-microservice (MIT)

Building a pipeline that generates Flutter apps from a spec, with an automated repair loop for whatever flutter analyze catches. The bug that actually cost money: a ConsumerState class with build(BuildContext context, WidgetRef ref) — correct on ConsumerWidget, a compile error on ConsumerState. Dart reports it as “more required arguments than those of overridden method ‘State.build’,” which reads like an inheritance complaint and says nothing about Riverpod. My repair loop burned all three retries on it without ever finding the cause.

Fix: diagnostics now route by ownership, not blind retry — a UI-anchored diagnostic goes back to the UI agent, a state-anchored one to the state agent. Retrying the same agent against a mistake it can’t see just spends the budget.

If you want to see what it actually produces rather than take that on faith: examples/generated-field-notes/ is real, unmodified output — 23 files from a 45-line spec.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다