Production-ready Flutter UI you can preview live and copy.
Flutter Templates is an open-source library of real Flutter screens — from single widgets to full apps. Every component runs live in your browser, so you can interact with it, read the source, and copy it straight into your project.
Stop rebuilding the same login form, product grid, or onboarding flow on every app. Find it, try it, ship it.
- Browse by category — 220+ widgets across 35+ categories (auth, AI, admin, forms, chat, e-commerce, dashboard, navigation, maps, IoT, and more).
- Preview live — every widget runs as a real Flutter app in an in-browser preview, not a screenshot.
- Flip to the source — switch between the running preview and its Dart code, and copy it.
- Explore full templates — complete app examples with live demos, screenshots, and source links.
- Search — jump straight to any widget or template by keyword.
The repo has two connected parts:
- Website + content (Astro):
src/ - Flutter source app for previews:
flutter_apps/core/
In short:
- The website renders content from Markdown.
- Widget pages embed the Flutter web app in an iframe.
- The iframe receives a
pathquery parameter and loads the matching Flutter screen.
- Node.js (LTS recommended)
pnpm(this repo usespnpm@10)- Flutter SDK (required to run or build widget previews)
pnpm installRun these in two terminals:
pnpm dev # Astro sitepnpm run-apps # Flutter web app on port 8989, for live iframe previewsIf you run only pnpm dev, pages still load, but the widget previews won't work in dev mode.
pnpm dev— start the Astro dev serverpnpm run-apps— run the Flutter core app in the browser (--web-port 8989)pnpm build— build the Astro sitepnpm build-apps— build the Flutter web app(s) and copy output topublic/flutter_apps/*pnpm preview— preview the built Astro outputpnpm deploy— build and deploy with Wranglerpnpm format— formatsrc/with Prettier
Content is powered by Astro collections defined in src/content.config.ts.
Location: src/content/widgets/**
Common frontmatter fields:
titledescriptionapp(currentlycore)path(Flutter route used by the iframe, e.g./ecommerce/product_grid)previewSize(mobile,tablet,desktop)code_files(paths relative toflutter_apps/core/lib/)order,icon(for grouping and navigation)
Example:
---
title: Product Grid
description: Responsive grid of product cards
app: core
path: /ecommerce/product_grid
code_files: ["ecommerce/product_grid.dart"]
previewSize: mobile
---Validation rules for code_files are enforced (no absolute paths, .., wildcards, or trailing slashes).
Location: src/content/templates/**
Common frontmatter fields:
titledescriptiontype(micro-interaction,full-app,ui-kit,single-page,clone)heroImage,appImagesgithubUrl,demoUrl,youtubeVideoIdtags
- Widget pages are generated from
src/pages/widgets/[...slug].astro. - The page loads source from
flutter_apps/<app>/lib/*based oncode_files. - The preview iframe points to:
- dev:
http://localhost:8989/?path=<widget-path>&theme=<theme> - production:
/flutter_apps/<app>/index.html?path=<widget-path>&theme=<theme>
- dev:
- Flutter route mapping lives in
flutter_apps/core/lib/main.dart(theroutesmap).
src/pages/— Astro routes (home, widgets, templates, search, OG image routes)src/components/— Astro/React UI (header, sidebar, preview tabs, iframe, search)src/content/widgets/— widget metadata and contentsrc/content/templates/— template metadata and contentsrc/styles/global.css— theme tokens and global stylesflutter_apps/core/lib/— Flutter widget/template screens and the route mappublic/flutter_apps/core/— built Flutter web output (generated)scripts/build.js— builds all Flutter apps and copies artifacts topublic/flutter_apps/
- Create the Dart screen in
flutter_apps/core/lib/<category>/.... - Register its route in
flutter_apps/core/lib/main.dart. - Add a Markdown entry in
src/content/widgets/<category>/<widget>.mdwith matchingpathandcode_files. - For a new category, add
src/content/widgets/<category>/index.md.
- Create
src/content/templates/<template>.md. - Add image assets to
src/assets/template_images/as needed. - Fill in the frontmatter (
title,description,heroImage, links, tags, etc.).
- Make sure Markdown entries and Dart files match, and every
code_filespath exists. - Run
pnpm format. - Run
pnpm build. - If Flutter screens changed, run
pnpm build-appsand include the generated updates when appropriate.
MIT