TGViewer
Efficient programmer's notes Efficient programmer's notes @efficient_programmer · 80 subscribers
Post #62 169
AI can ship your UI faster — unless your Figma is chaos

Implementing mobile layouts is boring work. You're essentially a human compiler — copying padding values, font sizes, and color codes from Figma to your IDE. No creativity, no challenge, just routine.

I tried using Cursor with design screenshots. It would generate something similar, but never accurate enough:

- Inconsistent spacing values
- Wrong font sizes and weights
- Slightly off colors (`#2A2A2A` instead of `#1F1F1F`)
- Design icons replaced with similar ones from MaterialIcons

Then I discovered Figma MCP and everything changed.

Yes, it costs €12/month, but it's worth every cent.

Figma MCP is a bridge between Figma and your coding agent. It provides tools that allow the agent to extract actual design data — variables, styles, and metadata from selected frames. It also provides screenshots so the agent can understand the visual semantics. Combined, the agent gets both the precise design tokens and the visual context.

The results are significantly better.

But here's the critical part — and this is where most setups fail:

The designer must follow atomic design principles

Your designer needs to:

1. Create design tokens (atoms) — colors, fonts, spacings as variables
2. Build components (molecules) from these tokens
3. Compose screens from these components

Think of it as a proper design system hierarchy.

My workflow

As a Flutter developer, I use the AI agent with Figma MCP for the entire process:

1. Tokens → AppTheme
The agent generates color tokens (like primary500, error300`), typography (`heading1, body2`), and spacing (`spacing8, `spacing16`) with matching names from Figma.

2. Components → Reusable widgets
The agent creates Flutter widgets using these tokens.

3. Screens → Complete layouts
I feed the agent context: “tokens are in AppTheme class, components are in `lib/src/core/uikit`” or use a custom skill, and it generates screens using the existing code structure.

The key is naming consistency. When Figma tokens and Flutter code use identical names, the agent can reference them correctly.

Is it pixel-perfect?

No. I still need to review the generated code and make adjustments.

There's a way to make it more reliable using Flutter golden tests — the agent generates a component, compares it to the Figma screenshot, and if pixels don't match, it fixes the code and compares again. But this feels like overengineering for now. The feedback cycle can take too long for simple components.

Manual review is faster.

Garbage in, garbage out

I'm fortunate that my girlfriend creates proper design systems with clean component structure and consistent tokens. This saves me hours of manual implementation.

But I've worked with many designers who focus only on visual appeal without considering implementation. Their Figma files have random spacing values, inconsistent colors, and “components” that aren't actually reusable.

These designs look good but don't generate good code.
  • 👍 4
  • 🔥 2
More from @efficient_programmer
  1. Apr 14, 2026A while back I started diving into system design. I got curious about how large-scale mode…
  2. Feb 27, 2026The question I ask at every interview Once, at one of my first interviews for a mobile dev…
  3. Feb 15, 2026TL;DR This approach eliminates the tedious part of mobile development. But it requires str…
  4. Feb 4, 2026How my LLM coding subscriptions escalated It started very innocently. 1. Free ChatGPT Back…
  5. Jan 29, 2026At some point, being “just a mobile developer” stopped feeling like enough. I’ve been a Fl…
  6. Mar 9, 2023Be willing to learn One day we've all written suboptimal code. Maybe it lacked decompositi…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →