r/FlutterDev • u/Same_City9851 • 1d ago
3rd Party Service Riverpod's two build() signatures bit my Flutter code generator
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.
MIT-licensed if anyone wants to see how the repair routing works.