Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A collection of Flutter examples and demos

License

NotificationsYou must be signed in to change notification settings

flutter/samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Status

A collection of open source samples that illustrate best practices forFlutter.

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 thecontributor's guide if you have contributions.

Googler's, you can freely add samples to theflutter/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 usingpackage: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.
  • gemini_tasks - A developer sample written in Flutter demonstrating how to interact with a to-do list in natural language using the Gemini API.
  • 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 usingisolates.
  • navigation_and_routing - A sample that shows how to usego_router API to handle common navigation scenarios.
  • place_tracker - A sample place tracking app that uses thegoogle_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 usingpackage:provider to manage state.
  • provider_shopper - A Flutter sample app that shows a state management approach usingpackage:provider.
  • simple_shader - A simpleFlutter 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 ofTextEditingDeltas 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 ofFlutter into an existing iOS or Android app.
    • prebuilt_module — Embeds a full screeninstance of Flutter as a prebuilt library that can be loaded into an existingiOS or Android app.
    • plugin — Embeds a full screen Flutter instance thatis using plugins into an existing iOS or Android app.
    • books — Mimics a real world use-case of embedding Flutter into anexisting Android app and demonstrates usingPigeon to communicate between Flutter andthe host application.
    • multiple_flutters — Shows the usage of the FlutterEngine Group APIs to embed multiple instances of Flutter into an existing appwith low memory cost.
    • android_view — Shows how to integrate a Flutteradd-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 arecorrect and concise code that developerscanquickly understand andeasily reuse with minimal side effects.Samples teach developers how to be successful using Flutter and Dart.They are maintained on an ongoing basisto 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 theproduct,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,useflutter run inside that example's directory.See thegetting started guide to install theflutter tool.

Important

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

Interested in contributing?

See thecontributor's guide!

Questions or issues?

If you have a general question about one of these samples or how to adapt itstechniques 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 theflutter/samples issue tracker.

About

A collection of Flutter examples and demos

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp