DEV Community

Stress-Testing an AI-Designed Architecture for Flutter on watchOS (Experiment)

TL;DR

  • Prototype for Apple Watch hot reload, in the Simulator. Flutter frames stream over a local WebSocket into a SwiftUI Canvas, and taps travel back, with a first frame in a few hundred milliseconds in CI. On a real watch, Apple's TN3135 says this networking is blocked, so the real-device version is the open question.
  • The Flutter engine's embedder.h interface can run Dart in a watchOS Simulator process. A retagged macOS debug engine rendered glyphs and colors, handled a tap and a synthetic scroll, and every pixel was checked in CI. It's a wiring experiment that never ships.
  • A reproducible map of what blocks Flutter on watchOS. Metal.h, CAMetalLayer, UIView and fork() don't compile against the watchOS SDK, while SpriteKit, CoreGraphics, CoreText and the Crown API do. 22 of the desktop embedder's 673 imported symbols are missing, 21 of them Metal-related.
  • A hardware probe for whoever picks this up. A small open watchOS app and Mac server print one paste-ready result block covering JIT, networking, memory and decode speed. Anyone with an Apple Watch and a Mac can run it and answer the questions CI can't. I don't own the hardware, so this is where my part of the work stops.
  • Built and verified with no Mac and no watch. Every result comes from GitHub's macOS runners, with AI assistance disclosed in the repo. Not proven: anything on a physical watch, an AOT or source-built engine, battery, memory limits, and App Review acceptance.

Motivation

For the longest time, I have always wanted to see Flutter on watchOS, so that one day I could do cross-platform development between watchOS and Wear OS. In a Flutter survey, I submitted this request, but it was never part of their roadmap.

So, I did a lot of brainstorming on how to achieve it and build a proof of concept to demonstrate, hoping to eventually see first-party support for wearables.

On the Wear OS side, I wasn't too worried since there are a bunch of packages that allow you to work with it, though it would still be interesting to see official tooling for Wear OS. As for watchOS, the main reasons were that no one had built the engine embedder for WatchKit, and the tooling and plugin ecosystem didn’t support the platform.

However, I didn't stop there, even though I have never owned an Apple Watch or written a single line of Swift.

Working with AI

As AI was getting better, I began to brainstorm with Gemini to eventually bring this to light while diligently learning prompt engineering to get the answers I sought. Given that AI was trained on data available on the internet, I kept seeing the same response: that it was nearly impossible to achieve because of Apple's ecosystem and device limitations. Then I did the same with Claude. I did this repeatedly to see what the AI could come up with.

The core problems I faced with watchOS were the lack of Metal, no UIKit, a 30 MB memory limit, no JIT for hot reload, and no Dart VM at runtime. I used Gemini and Claude as thinking partners to work through whether it was even architecturally possible.

Then I had an idea: I asked Claude to create a specification document of what we discussed. I used this document to ask Gemini for its thoughts on the plan. Gemini proposed some changes, which I then validated with Claude to see if they were plausible, while also using my knowledge as a programmer to see if it made sense.

For each new idea or proposed fix I received from Claude, I recreated the document with AI, adding a changelog and incrementing its version along with new updates. I've managed to find clues and solutions to work around watchOS's strict ecosystem.

Two-Mode Architecture

What I came up with is a two-mode architecture. In development, Flutter runs on your Mac and streams frames to the watch over WebSockets for hot reload. In production, the Flutter engine runs on the watch itself through the embedder API. Both modes draw using SwiftUI's Canvas.

An interesting aspect of this research branch is making each draw call low-allocation by writing raw bytes into shared native memory that Swift reads in place, instead of copying and serializing data across FFI every frame. It’s currently untested, so the performance savings remain a hypothesis for now.

Validating with CI

While building my article and getting feedback during a review, someone suggested using CI runners to provide proof of the claims in my document, so I started asking AI to draft small tests to prove my architectural design concepts.

Initially, I created my tests with Claude, but I rapidly hit a point where long chats consumed my token limit quickly. I had to wait 5 hours and start a new chat so that it wouldn't scan the entire conversation history. I needed another approach, as I knew this wouldn't work out in the long run.

So, I tried Google AI Studio, only to realize that I couldn't get the updated tests into a zip file to download like Claude provided whenever new file changes were made, which I could then unzip, paste into VS Code, and push to the CI runner. At first, with Google AI Studio, I was copying and pasting each file one by one for code changes, which was tedious, so I had to resort to another method to make this work smoothly.

I started using the Antigravity extension for VS Code. However, once I quickly reached the end of the free tier (a one-week limit before I could use it again), I went back to Google AI Studio and found a workflow that worked for me.

What I did was compile the tests along with the specifications into a zip file and send it to Google AI Studio. Once analyzed, it spat out a Python CLI command to modify my files, which I then copied and pasted to run in the VS Code terminal. It gave me the commits along the way, which I pushed afterward.

Then, to save tokens on Claude, I only used it to review the document specs and validate the CI runner results against the specification document, which I then reported back to Google AI Studio. It worked quite well. It was like Claude was the senior engineer and Google AI Studio was the junior developer learning and making the fixes that Claude asked it to do.

Links and Resources

You can find the full architectural specification I created for watchOS on my GitHub. Keep in mind that this research is an open design proposal that anybody including the Flutter team can build upon. If you're ambitious enough, you could even use something like Antigravity 2.0 multi-agent workflows to build out the various phases of the implementation.

Because I didn't have access to a local Mac or a physical Apple Watch, I relied entirely on GitHub Actions macOS runners to validate the architecture in the watchOS Simulator.

If you want to dive in or test this design yourself, here are the links:

  • Spec: Flutter watchOS Architecture
  • Flutter for watchOS: Maintainer Summary
  • CI Proofs 1: All 34 checks passing
  • CI Proofs 2: All 14 check passing
  • Reproduction: Instructions on running the tests
  • Changelog: Evolution of the architecture
  • Future Horizon: Decoupled Wearables (watchOS & Wear OS)
  • Appendix A: Display-List Research Path

Comparison with flutter-watchos

While planning this out, I came across the flutter-watchos project, which validates a lot of the same concepts I’ve been researching. They even have apps shipped on the App Store today.

Comparing it to my architecture, they arrived at a similar high-level goal: running the engine on device. However, their engine source isn't public, and the binaries are locked behind an account sign-in. As a result, I couldn't inspect their engine internals to see how our low-level solutions compare, but looking at their public docs uncovered a few interesting differences:

  • Topic / This spec / flutter-watchos (per its public docs)
  • Scope / Two layers: an open embedder.h runtime, plus an engine-agnostic watchos_ui, validator and preview tooling (Layer 1 has a v0.1 PoC with Linux CI) / One integrated toolchain
  • Engine on the watch / Patched official engine ran Dart, rendered frames and handled touch and a scroll signal inside a Simulator process in CI; no shippable build, nothing on a real watch / Working: engine built for watchOS, AOT device builds, App Store app reported
  • Engine source / Open route proposed (software-only target modelled on qnx); untested / Engine downloaded after GitHub sign-in; whether its source is public isn't stated
  • Rendering / Software rasterizer path, tested only in a patched Simulator process / Reported: Impeller on Metal via an SDK overlay, CPU fallback (their website)
  • Rendering risk / Software path may not survive upstream if Skia is phased out; Impeller CPU backend unconfirmed / Not discussed in the docs I read
  • Dev loop / Real app on the Mac streams frames to a Simulator client; passed in CI over loopback / Simulator hot reload; profile builds on a physical watch
  • Hot reload on a physical watch / Not available as designed: physical watches block WebSocket networking (Apple TN3135); an HTTP remote display is an untested experiment / Not supported
  • Widgets / watchos_ui v0.1 PoC built only on Flutter's widgets layer (no Material or Cupertino) / Stock Flutter widgets with iOS styling
  • Constraint checking / v0.1 PoC checker (WatchOSHigChecker) in Linux CI; not validated against real apps or hardware / No HIG validator mentioned on its site
  • Minimum device / watchOS 27+ (Series 9+, SE 3, Ultra 2+) / Series 9 or later
  • Display-list renderer / Archived research path ("Path B") / None described
  • Sources: the flutter-watchos repo, its architecture doc, flutterwatch.dev, the August 2026 ITNEXT article, and Apple's TN3135, The project is in beta and may have changed since.

Apple Compliance and Outlook

A quick note regarding Apple compliance: my design sticks strictly to public APIs that Apple officially supports. Apple doesn't expose any direct Metal access on the Apple Watch which is pretty ironic, since that's exactly what SwiftUI uses under the hood anyway. The fact that flutter-watchos claims to use Metal, while their engine binaries are closed-source, raises some fair questions about whether Apple is actually okay with that. I actually left that as an open question in the docs.

I believe there's no better time than today to bring Flutter to wearables especially as Flutter is now decoupling Material and Cupertino into standalone packages. This makes the core framework leaner and design-agnostic, which directly benefits wearables since custom libraries like watchos_ui can sit on a minimal base without carrying mobile design baggage.

On top of that, the hardware has matured: the Pixel Watch 5 in August, the Samsung Galaxy Watch 9 (powered by the new Snapdragon Wear Elite), and the Apple Watch Series 12 in September are all proof that wearables are in a different league now. They have higher performance, better battery efficiency, and more memory to spare.

I created this document out of a desire to see Flutter on wearables, primarily so we can use a single language like Dart to build for them instead of having to write separate Kotlin and Swift code. Even though I consider myself an intermediate Flutter developer with plenty left to learn, this project showed me how much AI can amplify your ideas and help you explore things that once felt out of reach.

This article has been reviewed and refined with the assistance of NotebookLM and Google Ai Studio to ensure technical accuracy and clarity. This article is a raw draft-only two people have seen it so far (one couldn't review it, and the other just gave a mysterious thumbs-up), so I'm honestly not even sure if it makes sense yet! Feedback, critiques, and ideas to improve the article are very welcome.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.