GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - flutter/samples: A collection of Flutter examples and demos

BranchesTags
Open more actions menu

Latest commit

 

History

1,929 Commits
1,929 Commits

Folders and files

NameName
Last commit message
Last commit date
.gemini
.gemini
 
 
.github
.github
 
 
.prompts
.prompts
 
 
add_to_app
add_to_app
 
 
analysis_defaults
analysis_defaults
 
 
android_splash_screen
android_splash_screen
 
 
animation_gallery
animation_gallery
 
 
animations
animations
 
 
asset_transformation
asset_transformation
 
 
background_isolate_channels
background_isolate_channels
 
 
compass_app
compass_app
 
 
cupertino_gallery
cupertino_gallery
 
 
date_planner
date_planner
 
 
desktop_photo_search
desktop_photo_search
 
 
docs
docs
 
 
dynamic_theme
dynamic_theme
 
 
form_app
form_app
 
 
google_maps
google_maps
 
 
ios_app_clip
ios_app_clip
 
 
material_3_demo
material_3_demo
 
 
navigation_and_routing
navigation_and_routing
 
 
pedometer
pedometer
 
 
platform_channels
platform_channels
 
 
platform_design
platform_design
 
 
platform_view_swift
platform_view_swift
 
 
simple_sdf
simple_sdf
 
 
simple_shader
simple_shader
 
 
testing_app
testing_app
 
 
tool
tool
 
 
veggieseasons
veggieseasons
 
 
web_embedding
web_embedding
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AUTHORS
AUTHORS
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
PATENTS
PATENTS
 
 
README.md
README.md
 
 
RELEASE.md
RELEASE.md
 
 
analysis_options.yaml
analysis_options.yaml
 
 
devtools_options.yaml
devtools_options.yaml
 
 
pubspec.yaml
pubspec.yaml
 
 

Repository files navigation

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.

Googlers, 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.
  • cupertino_gallery - A gallery of Cupertino widgets, demonstrating iOS-style UI components in Flutter.
  • date_planner - An in-progress exploration of an iOS-style Date Planner app, similar to the SwiftUI Tutorial app.
  • 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.
  • google_maps - Demonstrates the Google Maps for Flutter plugin.
  • navigation_and_routing - A sample that shows how to use go_router API to handle common navigation scenarios.
  • pedometer - A demo of a plugin that leverages FFIgen & JNIgen to call platform APIs directly from Dart code.
  • platform_design - This sample project shows a Flutter app that maximizes application code reuse while adhering to different design patterns on Android and iOS.
  • simple_sdf - A simple Flutter fragment shaders sample project showing how to draw Signed Distance Functions with the FragmentShader API.
  • simple_shader - A simple Flutter fragment shaders sample project.
  • 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

  • animations - Showcases Flutter's animation features
  • material_3_demo - showcases Material 3 features in the Flutter Material library.

Demo apps

  • compass_app - A sample application that implements MVVM architecture.
  • veggie_seasons - A demo application.

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:

  • The FlutterDev Discord
  • The Flutter Community forum

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

About

A collection of Flutter examples and demos

docs.flutter.dev/reference/learning-resources

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

19.3k stars

Watchers

462 watching

Forks

7.8k forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.