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
Что это такое?Открытая коллекция примеров, показывающих лучшие практики Flutter — запускаемые quickstart'ы и демо-приложения, охватывающие виджеты, навигацию, шейдеры, тестирование и встраивание Flutter в нативные приложения.
Это полноценные приложения, которые можно запустить, или просто фрагменты кода для копирования?И то, и другое. Большинство — это quickstart'ы с минимальным кодом для одной функции, а демо-приложения вроде compassapp и veggieseasons — полноценные приложения, которые вы собираете и запускаете.
Как запустить пример?Установите Flutter-инструменты, затем выполните 'flutter run' в каталоге любого примера — каждый пример в репозитории полностью запускается.
Что нужно установить, прежде чем что-то запускать?Только сам Flutter SDK. Исключение — примеры add-to-app: им нужны дополнительные нативные инструменты для iOS и Android, как описано в документации add-to-app.
Коллекция ещё пополняется новыми примерами?В основном нет — существующие примеры получают исправления и улучшения, но новые приостановлены, пока команда пересматривает подход к примерам кода в эпоху LLM; сотрудники Google добавляют новые примеры в flutter/demos.
Эти примеры рассчитаны на новичков во Flutter или на опытных разработчиков?На разработчиков Flutter и Dart — примеры учат эффективно работать с фреймворком и поддерживаются в актуальном состоянии с учётом меняющихся API и лучших практик.
Где работают эти примеры — на телефонах, десктопе или в вебе?В основном на телефонах с iOS и Android (CI собирает под обе платформы), плюс примеры встраивания Flutter в веб-приложения и десктопное демо поиска фото в стилях Material и FluentUI.
Могу ли я встроить Flutter в своё существующее iOS- или Android-приложение?Да — примеры add-to-app охватывают встраивание на весь экран, предсобранные модули и интеграцию на уровне view, а multipleflutters показывает запуск нескольких Flutter-движков с низким расходом памяти через Engine Group API.
Можно ли встроить Flutter в существующую веб-страницу?Да — примеры webembedding показывают element embedding без iframe: от базовой настройки hostElement до полноценной обёртки в виде Angular-компонента.
Что демонстрируют примеры с шейдерами?simpleshader и simplesdf знакомят с фрагментными шейдерами Flutter, включая рисование Signed Distance Functions через API FragmentShader.
Есть ли пример с использованием Gemini API?Да — dynamictheme демонстрирует вызов локальных Flutter API на основе результатов Gemini API.
Creator
flutter
Size
436.8 MB
Stars
19.3K
Updated
CommitOct 08
Age
8y
Commits · 90 Days