跪拜 Guibai
← Back to the summary

Flutter's Counter to Two Native Agents: Code Generation Is Cheap, Keeping Platforms Identical Is Not

Flutter's official stance: In the AI era, code is getting easier to write, so why still maintain one codebase?

Recently, whether it's Shopify or the public discussion over the past two months, it seems everyone is saying: since AI can already produce native Swift and Kotlin code at low cost, why would companies still use Flutter? Just let two Agents maintain iOS and Android separately, wouldn't that be enough?

image

Flutter's official answer to this is: ongoing maintenance cost.

The cost reduction people attribute to AI is actually the cost of writing code for the first time. But the ongoing maintenance cost after an app has been live for several years — such as keeping different platforms behaving the same, and fixing one bug correctly across multiple code repositories — is still real cost.

Simply put, the official perspective is:

These points are actually quite easy to understand. Take the first one: AI can certainly write two native codebases, but behavioral divergence still accumulates along the way. Here's a checkout state machine example:

Both sides of this code are actually reasonable, and local unit tests might pass. But when a user triggers a retry under an unstable network, one side may ignore stale results while the other side writes stale results back into the state.

image

In other words, AI can lower the production cost of Swift and Kotlin, but it cannot, at zero cost, eliminate differences in requirement understanding, retry timing, and boundary behavior between two implementations. For example, every time a requirement changes in the future, both sides still need separate implementation and cross-validation.

This is where Flutter still matters, especially for small and medium teams. With Flutter, a single set of Dart business logic and state machine means at least that part of the behavior only needs to be defined once, and UI integrity only needs to be accepted/verified once, then shared across iOS, Android, and even HarmonyOS and other platforms.

Of course, the most important thing is that Flutter is starting to build a verification loop for Agents. For example, Flutter Stateful Hot Reload can go below 200 milliseconds, and Widget tests below 500 milliseconds. Compared with traditional native builds that need 2–5 minutes, an Agent can actually get deterministic feedback after every code change, and try and fix more problems in the same amount of time.

image

Native plugin parts, however, cannot be this fast. But that part is actually the most valuable place in the AI era. In the past, the scariest thing about writing Flutter was native plugins: no one adapted them, you didn't understand them yourself, and working on them was painful.

But now, in the AI era, if a plugin has a problem you can fix it directly. This has become an advantage.

Currently the official team maintains Flutter Agent Plugins and Dart Skills, with 10 Flutter Skills and 14 Dart Skills respectively. Combined with dart mcp-server, static analysis, test execution, and runtime checks can be connected into development tools like Codex, Claude Code, and Cursor.

Even now, package authors can publish the corresponding Skill together with their pub.dev dependency, and developers can run dart run skills@ get to discover the rules provided by current dependencies.

Other things like A2UI and GenUI SDK for Flutter, or the GenKit Agent SDK, are all part of Flutter's adaptation and infrastructure capabilities around AI.

image

So Flutter is not just a cross-platform framework. In the AI era, it is also evolving further around AI, and this is Flutter's significance in the AI era.

Links

https://flutter.dev/blog/ai-makes-it-easy-to-migrate-flutter-makes-it-easy-to-scale

Comments

Top 4 from juejin.cn, machine-translated. The original thread is authoritative.

小猴子Monkey

These days, a pure native Xcode 27.1 build is roughly all it takes to adapt to iPhone Duo, while Flutter's latest tab bar still cuts through the side status bar and the navigation bar's back button remains at the top.

茶树米

In the human era, save manpower; in the AI era, save tokens.

zhao1zhihui

It feels like, in the future, we'll be like assembly-line workers in an electronics factory.

bb_c_e_f

Facing AI.