DEV Community

Cover image for How to generate functioning Flutter apps from multiple images with AI?
CodeLink
CodeLink

Posted on

1

How to generate functioning Flutter apps from multiple images with AI?

In the previous post, we demonstrated a Proof of Concept (PoC) for generating a functioning React app from multiple screenshots. In this PoC, we applied several prompting techniques to make the generated app resemble the screenshots as closely as possible. The structured code separates CSS, layout, and data, making it reusable and saving up to 20% of the development time by scaffolding an entire code base from scratch.

The prompts used in the PoC are adaptable enough to work with other tech stacks. We’re considering expanding this to generate Flutter apps. Mobile applications pose unique challenges like the build pipeline, native functionalities and navigation. By modifying the prompts and incorporating rule-based logic to handle mobile builds, we’ve managed to generate Flutter apps from images.

We have tested this engine with popular mobile apps like Messenger, Whatsapp and Instagram, and the results are promising!

As with the previous approach, we aim to generate something other than pixel-perfect apps. Instead, we generate high-quality, modular code for developers to build upon. This code features reusable components and separates layout and data. We’re excited to share some initial results with you!

Below, you can see the original image on the left and the generated view on the right. It prompted the use of placeholder images in the generated app.

Figure 1: Messenger profile view
generate functioning Flutter apps from multiple images with AI 1

Figure 2: Messenger chat view
generate functioning Flutter apps from multiple images with AI 2

Figure 3: Whatsapp chat view
generate functioning Flutter apps from multiple images with AI 3

Figure 4: Whatsapp profile view
generate functioning Flutter apps from multiple images with AI 4

Figure 5: Instagram feed view
generate functioning Flutter apps from multiple images with AI 5

Figure 6: Instagram profile view
generate functioning Flutter apps from multiple images with AI 6

We’ll soon add this feature to our PoC, available at codest.ai. If you’re interested in ReactJS apps, we encourage you to visit the website and experience it yourself!

Given the promising results with ReactJS and Flutter, we believe this approach should work well with React Native, too. We’ll test this idea and update you with the results. Please stay tuned!

Sentry mobile image

App store rankings love fast apps - mobile vitals can help you get there

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more