{"id":13695166,"url":"https://flutter.github.io/samples/","last_synced_at":"2025-05-03T13:32:01.253Z","repository":{"id":37265226,"uuid":"136667574","full_name":"flutter/samples","owner":"flutter","description":"A collection of Flutter examples and demos","archived":false,"fork":false,"pushed_at":"2024-05-21T22:00:25.000Z","size":958752,"stargazers_count":16672,"open_issues_count":44,"forks_count":7420,"subscribers_count":446,"default_branch":"main","last_synced_at":"2024-05-22T14:27:39.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://flutter.github.io/samples/","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flutter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-08T21:28:03.000Z","updated_at":"2024-05-28T19:39:20.022Z","dependencies_parsed_at":"2024-05-28T19:50:44.247Z","dependency_job_id":null,"html_url":"https://github.com/flutter/samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter%2Fsamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter%2Fsamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter%2Fsamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter%2Fsamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flutter","download_url":"https://codeload.github.com/flutter/samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224364257,"owners_count":17299039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T18:00:18.644Z","updated_at":"2025-05-03T13:32:01.247Z","avatar_url":"https://github.com/flutter.png","language":"Dart","readme":"# Flutter samples\n\n[![Build Status](https://github.com/flutter/samples/workflows/Main%20Branch%20CI/badge.svg)](https://github.com/flutter/samples/actions?workflow=Main%20Branch%20CI)\n\nA collection of open source samples that illustrate best practices for\n[Flutter].\n\n## Index\n\n### Quickstarts\n\n* [`asset_transformation`] - Demonstrates how to transform images' color scales and formats. \n* [`background_isolate_channels`] - Demonstrates how to use long-lived isolates.\n* [`code_sharing`] - Demonstrates how to share business logic between Flutter client and Dart server using [`package:shelf`] )\n* [`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.\n* [`desktop_photo_search`] - Demonstrates desktop features in both Material and FluentUI design systems.\n* [`dynamic_theme`] - A developer sample demonstrating how to call on-device Flutter APIs based on output from the Gemini API.\n* [`form_app`] - A sample demonstrating different types of forms and best practices.\n* [`game_template`] - (**note: deprecated!**) A starter game in Flutter with all the bells and whistles of a mobile (iOS \u0026 Android) game.\n* [`gemini_tasks`] - A developer sample written in Flutter demonstrating how to interact with a to-do list in natural language using the Gemini API.\n* [`google_maps`] - Demonstrates the Google Maps for Flutter plugin.\n* [`infinite_list`] - A Flutter sample app that shows an implementation of the \"infinite list\" UX pattern.\n* [`isolate_example`] - A sample application that demonstrate best practices when using [isolates].\n* [`navigation_and_routing`] - A sample that shows how to use [go_router] API to handle common navigation scenarios.\n* [`place_tracker`] - A sample place tracking app that uses the [google_maps_flutter plugin].\n* [`platform_design`] - This sample project shows a Flutter app that maximizes application code reuse while adhering to different design patterns on Android and iOS.\n* [`provider_counter`] - The starter Flutter application, but using [package:provider] to manage state.\n* [`provider_shopper`] - A Flutter sample app that shows a state management approach using [package:provider].\n* [`simple_shader`] - A simple [Flutter fragment shaders] sample project.\n* [`simplistic_calculator`] - A calculator to demonstrate a simple start for a desktop Flutter app.\n* [`simplistic_editor`] - This sample text editor showcases the use of [TextEditingDeltas] and a DeltaTextInputClient to expand and contract styled ranges of text.\n* [`testing_app`] - A sample app that shows different types of testing in Flutter.\n* [`web_embedding`] - This directory contains examples of how to embed Flutter in web apps (without iframes).\n  * [`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.\n  * [`ng-flutter`] - A simple Angular app (and component) that replicates the above example, but in an Angular style.\n\n### Native platform samples\n\n* [`add-to-app`] - Collection of samples that demonstrate embedding Flutter a view into a native app.\n  * [`fullscreen`] — Embeds a full screen instance of\n  Flutter into an existing iOS or Android app.\n  * [`prebuilt_module`] — Embeds a full screen\n  instance of Flutter as a prebuilt library that can be loaded into an existing\n  iOS or Android app.\n  * [`plugin`] — Embeds a full screen Flutter instance that\n  is using plugins into an existing iOS or Android app.\n  * [`books`] — Mimics a real world use-case of embedding Flutter into an\n  existing Android app and demonstrates using [Pigeon] to communicate between Flutter and\n  the host application.\n  * [`multiple_flutters`] — Shows the usage of the Flutter\n  Engine Group APIs to embed multiple instances of Flutter into an existing app\n  with low memory cost.\n  * [`android_view`] — Shows how to integrate a Flutter\n  add-to-app module at a view level for Android.\n* [`android_splash_screen`]\n* [`ios_app_clip`]\n* [`platform_channels`] - A sample app which demonstrates how to use MethodChannel, EventChannel, BasicMessageChannel and MessageCodec in Flutter.\n* [`platform_view_swift`] - A Flutter sample app that combines a native iOS UIViewController with a full-screen Flutter view.\n\n### Demo galleries\n\n* [`animations`] - Showcases Flutter's animation features\n* [`material_3_demo`] - showcases [Material 3] features in the Flutter Material library.\n\n### Demo apps\n\n* [`compass_app`] - A sample application that implements MVVM architecture.\n* [`deeplink_store_example`] - A demo app that implements deep-linking with go_router.\n* [`veggie_seasons`] - A demo application.\n\n## Flutter sample code\n\nSamples are **correct and concise code** that developers \ncan **quickly understand** and **easily reuse** with minimal side effects. \nSamples teach developers how to be successful using Flutter and Dart. \nThey are maintained on an ongoing basis \nto reflect changing APIs and best practices.\n\n### Types of samples\n\nThere are two types of sample code in this repository:\n\n* **Quickstarts** provide a starting point to extend. They answer the question,\n  \"What is the minimal amount of code needed to implement this feature?\"\n* **Demo apps** are meant to be built and ran. They demo the _product_, \n   not how to write code.\n\nA majority of samples in this repository are quickstarts.\n\n## Usage\n\nEvery sample in this repo is fully runnable. To run an example, \nuse `flutter run` inside that example's directory. \nSee the [getting started guide] to install the `flutter` tool.\n\n\u003e [!IMPORTANT]  \n\u003e If you want to run an add-to-app sample, there are additional requirements.\n\u003e We suggest reading the [add-to-app documentation].\n\n### Tip: minimize download size\n\nAs this repository is quite big, you can use \n[svn] to download a single example.\nFor example:\n\n```\nsvn co https://github.com/flutter/samples/trunk/provider_shopper\n```\n\nYou can also use a [partial clone] to skip blob objects \nthat aren't currently checked out, while including the full commit history:\n\n```\ngit clone --filter=blob:none https://github.com/flutter/samples.git\n```\n\n## Interested in contributing?\n\nSee the [contributor's guide]!\n\n## Questions or issues?\n\nIf you have a general question about one of these samples or how to adapt its\ntechniques for one of your own apps, try one of these resources:\n\n* [The FlutterDev Discord]\n* [The Flutter Community forum]\n\nIf you run into a bug in one of the samples, please file an issue in the\n[`flutter/samples` issue tracker].\n\n\n[`asset_transformation`]: ./asset_transformation\n[`background_isolate_channels`]: ./background_isolate_channels\n[`code_sharing`]: ./code_sharing\n[`context_menus`]: ./context_menus\n[`desktop_photo_search`]: ./desktop_photo_search\n[`dynamic_theme`]: ./dynamic_theme\n[`form_app`]: ./form_app\n[`game_template`]: ./game_template\n[`gemini_tasks`]: ./gemini_tasks\n[`google_maps`]: ./google_maps\n[`infinite_list`]: ./infinite_list\n[`isolate_example`]: ./isolate_example\n[`navigation_and_routing`]: ./navigation_and_routing\n[`place_tracker`]: ./place_tracker\n[`platform_design`]: ./platform_design\n[`provider_counter`]: ./provider_counter\n[`provider_shopper`]: ./provider_shopper\n[`simple_shader`]: ./simple_shader\n[`simplistic_calculator`]: ./simplistic_calculator\n[`simplistic_editor`]: ./simplistic_editor\n[`testing_app`]: ./testing_app\n[`web_embedding`]: ./web_embedding\n[`element_embedding_demo`]: ./web_embedding/element_embedding_demo\n[`ng-flutter`]: ./web_embedding/ng-flutter\n[`add-to-app`]: ./add_to_app\n[`fullscreen`]: ./add_to_app/fullscreen\n[`prebuilt_module`]: ./add_to_app/prebuilt_module\n[`plugin`]: ./add_to_app/plugin\n[`books`]: ./add_to_app/books\n[`multiple_flutters`]: ./add_to_app/multiple_flutters\n[`android_view`]: ./add_to_app/android_view\n[`android_splash_screen`]: ./android_splash_screen\n[`ios_app_clip`]: ./ios_app_clip\n[`platform_channels`]: ./platform_channels\n[`platform_view_swift`]: ./platform_view_swift\n[`animations`]: ./animations\n[`material_3_demo`]: ./material_3_demo\n[`compass_app`]: ./compass_app\n[`deeplink_store_example`]: ./deeplink_store_example\n[`veggie_seasons`]: ./veggieseasons\n\n[Flutter]: https://flutter.dev\n[getting started guide]: https://docs.flutter.dev/get-started/install\n[add-to-app documentation]: https://docs.flutter.dev/add-to-app\n[isolates]: https://api.dart.dev/dart-isolate/Isolate-class.html\n[Material 3]: https://m3.material.io\n[go_router]: https://pub.dev/packages/go_router\n[google_maps_flutter plugin]: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter\n[package:provider]: https://pub.dev/packages/provider\n[Flutter fragment shaders]: https://docs.flutter.dev/development/ui/advanced/shaders\n[TextEditingDeltas]: https://api.flutter.dev/flutter/services/TextEditingDelta-class.html\n[Pigeon]: https://pub.dev/packages/pigeon\n[`package:shelf`]: https://pub.dev/packages/shelf\n[svn]: https://subversion.apache.org/\n[partial clone]: https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/\n[contributor's guide]: CONTRIBUTING.md\n[The FlutterDev Discord]: https://discord.gg/rflutterdev\n[The Flutter Community forum]: https://forum.itsallwidgets.com/latest\n[`flutter/samples` issue tracker]: https://github.com/flutter/samples/issues\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/flutter.github.io%2Fsamples%2F","html_url":"https://awesome.ecosyste.ms/projects/flutter.github.io%2Fsamples%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/flutter.github.io%2Fsamples%2F/lists"}