A collection of Flutter examples and demos https://docs.flutter.dev/reference/learning-resources
Find a file
Fred Sauer dcaf555586
[samples] Remove gemini_tasks (#2815)
Removes deprecated gemini_tasks.
2026-03-12 10:13:14 -07:00
.gemini Cupertino gallery app (#2715) 2026-02-09 15:37:25 -08:00
.github Bump actions/checkout from 6.0.1 to 6.0.2 (#2778) 2026-01-27 14:04:33 +08:00
.prompts Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
add_to_app [samples] Remove usesCleartextTraffic (#2809) 2026-02-26 23:45:17 +00:00
ai_recipe_generation [samples] Remove gemini_tasks (#2815) 2026-03-12 10:13:14 -07:00
analysis_defaults Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
android_splash_screen Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
animations axisAlignment is deprecated in beta causing PRs to fail checks (#2811) 2026-02-26 14:23:39 -08:00
asset_transformation Fixes CI ahead of next release 2026-02-09 13:26:00 -08:00
background_isolate_channels Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
code_sharing Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
compass_app docs: fix typo in compass_app BookingSummary class doc (#2786) 2026-01-27 14:21:37 +08:00
context_menus Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
cupertino_gallery Cupertino gallery app (#2715) 2026-02-09 15:37:25 -08:00
date_planner Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
deeplink_store_example Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
desktop_photo_search Replace pub run usages with dart run (#2777) 2026-01-27 13:27:50 +08:00
docs Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
dynamic_theme Fixes CI ahead of next release 2026-02-09 13:26:00 -08:00
experimental Retire VeggieSeasons (really this time) (#2724) 2025-08-21 10:42:11 -07:00
flutter_maps_firestore Retire VeggieSeasons (really this time) (#2724) 2025-08-21 10:42:11 -07:00
form_app Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
game_template Replace pub run usages with dart run (#2777) 2026-01-27 13:27:50 +08:00
google_maps Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
infinite_list Retire VeggieSeasons (really this time) (#2724) 2025-08-21 10:42:11 -07:00
ios_app_clip Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
isolate_example Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
material_3_demo Fixes CI ahead of next release 2026-02-09 13:26:00 -08:00
navigation_and_routing Fix TabController index update (#2753) 2025-12-17 11:26:12 -06:00
pedometer Replace pub run usages with dart run (#2777) 2026-01-27 13:27:50 +08:00
place_tracker 3.38 / 3.10 (#2742) 2025-11-12 11:46:47 -08:00
platform_channels 3.38 / 3.10 (#2742) 2025-11-12 11:46:47 -08:00
platform_design 3.38 / 3.10 (#2742) 2025-11-12 11:46:47 -08:00
platform_view_swift Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
provider_counter Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
provider_shopper 3.38 / 3.10 (#2742) 2025-11-12 11:46:47 -08:00
simple_shader Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
simplistic_calculator [simplistic_calculator] fix math_expressions min version (#2738) 2025-10-28 12:35:07 +01:00
simplistic_editor 3.38 / 3.10 (#2742) 2025-11-12 11:46:47 -08:00
testing_app 3.38 / 3.10 (#2742) 2025-11-12 11:46:47 -08:00
tool [samples] Remove gemini_tasks (#2815) 2026-03-12 10:13:14 -07:00
veggieseasons Retire VeggieSeasons (really this time) (#2724) 2025-08-21 10:42:11 -07:00
web_embedding Bump @angular/compiler-cli from 20.3.17 to 21.2.0 in /web_embedding/ng-flutter (#2813) 2026-03-02 06:49:55 +00:00
.gitattributes Add a .gitattributes file (#929) 2021-10-15 14:45:14 -07:00
.gitignore Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
AUTHORS Add game_template (#1180) 2022-05-10 15:08:43 +02:00
CONTRIBUTING.md Fixup internal links in CONTRIBUTING.md (#2552) 2024-12-17 08:49:17 -05:00
devtools_options.yaml Dart 3.9 / Flutter 3.35 [first LLM release] (#2714) 2025-08-14 12:26:24 -07:00
LICENSE Adding Rally App to Flutter Samples (#135) 2019-09-05 12:36:20 -07:00
PATENTS Initial commit 2018-06-08 14:36:44 -07:00
pubspec.yaml [samples] Remove gemini_tasks (#2815) 2026-03-12 10:13:14 -07:00
README.md [samples] Remove gemini_tasks (#2815) 2026-03-12 10:13:14 -07:00

Flutter samples

Build Status

A collection of open source samples that illustrate best practices for Flutter.

Contributing

We appreciate fixes and necessary improvements to existing samples. But in most cases, we're not currently adding new samples to this repository while we rethink sample code in the new LLM world.

Please read the contributor's guide if you have contributions.

Googler's, you can freely add samples to the flutter/demos repository.

Index

Quickstarts

  • asset_transformation - Demonstrates how to transform images' color scales and formats.
  • background_isolate_channels - Demonstrates how to use long-lived isolates.
  • code_sharing - Demonstrates how to share business logic between Flutter client and Dart server using package:shelf )
  • context_menus - This sample shows how to create and customize cross-platform context menus, such as the text selection toolbar on mobile or the right click menu on desktop.
  • desktop_photo_search - Demonstrates desktop features in both Material and FluentUI design systems.
  • dynamic_theme - A developer sample demonstrating how to call on-device Flutter APIs based on output from the Gemini API.
  • form_app - A sample demonstrating different types of forms and best practices.
  • game_template - (note: deprecated!) A starter game in Flutter with all the bells and whistles of a mobile (iOS & Android) game.
  • google_maps - Demonstrates the Google Maps for Flutter plugin.
  • infinite_list - A Flutter sample app that shows an implementation of the "infinite list" UX pattern.
  • isolate_example - A sample application that demonstrate best practices when using isolates.
  • navigation_and_routing - A sample that shows how to use go_router API to handle common navigation scenarios.
  • place_tracker - A sample place tracking app that uses the google_maps_flutter plugin.
  • platform_design - This sample project shows a Flutter app that maximizes application code reuse while adhering to different design patterns on Android and iOS.
  • provider_counter - The starter Flutter application, but using package:provider to manage state.
  • provider_shopper - A Flutter sample app that shows a state management approach using package:provider.
  • simple_shader - A simple Flutter fragment shaders sample project.
  • simplistic_calculator - A calculator to demonstrate a simple start for a desktop Flutter app.
  • simplistic_editor - This sample text editor showcases the use of TextEditingDeltas and a DeltaTextInputClient to expand and contract styled ranges of text.
  • testing_app - A sample app that shows different types of testing in Flutter.
  • web_embedding - This directory contains examples of how to embed Flutter in web apps (without iframes).
    • element_embedding_demo - Modifies the index.html of a flutter app so it is launched in a custom hostElement. This is the most basic embedding example.
    • ng-flutter - A simple Angular app (and component) that replicates the above example, but in an Angular style.

Native platform samples

  • add-to-app - Collection of samples that demonstrate embedding Flutter a view into a native app.
    • fullscreen — Embeds a full screen instance of Flutter into an existing iOS or Android app.
    • prebuilt_module — Embeds a full screen instance of Flutter as a prebuilt library that can be loaded into an existing iOS or Android app.
    • plugin — Embeds a full screen Flutter instance that is using plugins into an existing iOS or Android app.
    • books — Mimics a real world use-case of embedding Flutter into an existing Android app and demonstrates using Pigeon to communicate between Flutter and the host application.
    • multiple_flutters — Shows the usage of the Flutter Engine Group APIs to embed multiple instances of Flutter into an existing app with low memory cost.
    • android_view — Shows how to integrate a Flutter add-to-app module at a view level for Android.
  • android_splash_screen
  • ios_app_clip
  • platform_channels - A sample app which demonstrates how to use MethodChannel, EventChannel, BasicMessageChannel and MessageCodec in Flutter.
  • platform_view_swift - A Flutter sample app that combines a native iOS UIViewController with a full-screen Flutter view.

Demo galleries

Demo apps

Flutter sample code

Samples are correct and concise code that developers can quickly understand and easily reuse with minimal side effects. Samples teach developers how to be successful using Flutter and Dart. They are maintained on an ongoing basis to reflect changing APIs and best practices.

Types of samples

There are two types of sample code in this repository:

  • Quickstarts provide a starting point to extend. They answer the question, "What is the minimal amount of code needed to implement this feature?"
  • Demo apps are meant to be built and ran. They demo the product, not how to write code.

A majority of samples in this repository are quickstarts.

Usage

Every sample in this repo is fully runnable. To run an example, use flutter run inside that example's directory. See the getting started guide to install the flutter tool.

Important

If you want to run an add-to-app sample, there are additional requirements. We suggest reading the add-to-app documentation.

Interested in contributing?

See the contributor's guide!

Questions or issues?

If you have a general question about one of these samples or how to adapt its techniques for one of your own apps, try one of these resources:

If you run into a bug in one of the samples, please file an issue in the flutter/samples issue tracker.