samples README

The project's README from github.com/flutter/samples. As one markdown file: README.md.

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

Native platform samples

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:

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.

samples (flutter/samples)

Searching Database…

19.3K ·GitHub
What is this?An open source collection of samples illustrating best practices for Flutter — runnable quickstarts and demo apps covering widgets, navigation, shaders, testing, and embedding Flutter into native apps.
Are these complete apps I can run, or just code snippets to copy?Both. Most are quickstarts showing the minimal code needed for one feature, while demo apps like compassapp and veggieseasons are complete applications you build and run.
How do I get a sample running?Install the Flutter tool, then run 'flutter run' inside any sample's directory — every sample in the repo is fully runnable.
What do I need installed before I can run anything?Just the Flutter SDK itself. Add-to-app samples are the exception — they need extra native iOS and Android tooling, as the add-to-app docs explain.
Is the collection still being expanded with new samples?Mostly no — existing samples get fixes and improvements, but new ones are on hold while the team rethinks sample code for the LLM era; Googlers add new samples to flutter/demos instead.
Are these samples aimed at Flutter beginners or experienced developers?Flutter and Dart developers — the samples teach how to be successful with the framework and are maintained to reflect changing APIs and best practices.
Where do these samples run — phones, desktop, or the web?Mostly iOS and Android phones (CI builds both), plus examples of embedding Flutter in web apps and a desktop photo search demo in Material and FluentUI styles.
Can I embed Flutter into my existing iOS or Android app?Yes — the add-to-app samples cover full-screen embedding, prebuilt modules and view-level integration, and multipleflutters shows running several Flutter engines at low memory cost via the Engine Group APIs.
Can Flutter be embedded into an existing web page?Yes — the webembedding examples show element embedding without iframes, from a basic hostElement setup to a full Angular component wrapper.
What do the shader samples demonstrate?simpleshader and simplesdf introduce Flutter fragment shaders, including drawing Signed Distance Functions with the FragmentShader API.
Is there a sample that uses the Gemini API?Yes — dynamictheme demonstrates calling on-device Flutter APIs based on output from the Gemini API.
Creator
flutter
Size
436.8 MB
Stars
19.3K
Updated
CommitOct 08
Age
8y
Commits · 90 Days