1
0
mirror of https://github.com/flutter/samples.git synced 2026-06-12 01:09:47 +00:00
dependabot[bot] 80069cd272 Bump @angular-devkit/build-angular from 21.2.14 to 22.0.1 in /web_embedding/ng-flutter (#2853)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some time.

Note: if you make any changes to this PR yourself, they will take precedence over the rebase.

---

Bumps [@angular-devkit/build-angular](https://github.com/angular/angular-cli) from 21.2.14 to 22.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/angular/angular-cli/releases">@​angular-devkit/build-angular's releases</a>.</em></p>
<blockquote>
<h2>22.0.1</h2>
<h3><code>@​schematics/angular</code></h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="c800122945"><img src="https://img.shields.io/badge/c80012294-fix-green" alt="fix - c80012294" /></a></td>
<td>fix browserMode option mapping in refactor-jasmine-vitest</td>
</tr>
<tr>
<td><a href="a9b6bd9042"><img src="https://img.shields.io/badge/a9b6bd904-fix-green" alt="fix - a9b6bd904" /></a></td>
<td>safely comment out multiline statements in refactor-jasmine-vitest</td>
</tr>
<tr>
<td><a href="12199df00f"><img src="https://img.shields.io/badge/12199df00-fix-green" alt="fix - 12199df00" /></a></td>
<td>use null objects and callbacks in karma-to-vitest migration</td>
</tr>
</tbody>
</table>
<h3><code>@​angular/cli</code></h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="b54e9a549d"><img src="https://img.shields.io/badge/b54e9a549-fix-green" alt="fix - b54e9a549" /></a></td>
<td>do not sort migrations of the same version alphabetically</td>
</tr>
<tr>
<td><a href="d333116123"><img src="https://img.shields.io/badge/d33311612-fix-green" alt="fix - d33311612" /></a></td>
<td>fallback to local package.json for schematic detection on first run</td>
</tr>
<tr>
<td><a href="918102a937"><img src="https://img.shields.io/badge/918102a93-fix-green" alt="fix - 918102a93" /></a></td>
<td>isolate temporary package installation from parent pnpm workspace</td>
</tr>
<tr>
<td><a href="b048b5f4a8"><img src="https://img.shields.io/badge/b048b5f4a-fix-green" alt="fix - b048b5f4a" /></a></td>
<td>remove forceAuth and unscoped credential parsing</td>
</tr>
<tr>
<td><a href="2779340351"><img src="https://img.shields.io/badge/277934035-fix-green" alt="fix - 277934035" /></a></td>
<td>validate registry option is a valid URL in ng add</td>
</tr>
<tr>
<td><a href="4510dae021"><img src="https://img.shields.io/badge/4510dae02-perf-orange" alt="perf - 4510dae02" /></a></td>
<td>optimize update schematic registry query counts by fetching package metadata lazily</td>
</tr>
</tbody>
</table>
<h3><code>@​angular/build</code></h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="89d1be979f"><img src="https://img.shields.io/badge/89d1be979-fix-green" alt="fix - 89d1be979" /></a></td>
<td>allow disabling Vitest isolation from builder</td>
</tr>
<tr>
<td><a href="d45b84be9a"><img src="https://img.shields.io/badge/d45b84be9-fix-green" alt="fix - d45b84be9" /></a></td>
<td>exclude JSON imports from Vite dependency optimization</td>
</tr>
<tr>
<td><a href="e3cab4ddda"><img src="https://img.shields.io/badge/e3cab4ddd-fix-green" alt="fix - e3cab4ddd" /></a></td>
<td>prevent concurrent stylesheet bundling esbuild context leaks</td>
</tr>
<tr>
<td><a href="bd413b0eb1"><img src="https://img.shields.io/badge/bd413b0eb-fix-green" alt="fix - bd413b0eb" /></a></td>
<td>restrict application builder output paths to output directory</td>
</tr>
</tbody>
</table>
<h2>22.0.0</h2>
<h3><code>@​schematics/angular</code></h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="be60a63b7b"><img src="https://img.shields.io/badge/be60a63b7-feat-blue" alt="feat - be60a63b7" /></a></td>
<td>add migrate-karma-to-vitest update migration</td>
</tr>
<tr>
<td><a href="43505066e2"><img src="https://img.shields.io/badge/43505066e-feat-blue" alt="feat - 43505066e" /></a></td>
<td>add migration to add istanbul-lib-instrument</td>
</tr>
<tr>
<td><a href="b2f7a038b4"><img src="https://img.shields.io/badge/b2f7a038b-feat-blue" alt="feat - b2f7a038b" /></a></td>
<td>conditionally install istanbul coverage provider for Vitest migration</td>
</tr>
<tr>
<td><a href="d227e6985e"><img src="https://img.shields.io/badge/d227e6985-feat-blue" alt="feat - d227e6985" /></a></td>
<td>migrate fake async to Vitest fake timers</td>
</tr>
<tr>
<td><a href="d2aa9ede55"><img src="https://img.shields.io/badge/d2aa9ede5-feat-blue" alt="feat - d2aa9ede5" /></a></td>
<td>migrate fakeAsync's flush behavior when used in beforeEach</td>
</tr>
<tr>
<td><a href="f98cc82eb0"><img src="https://img.shields.io/badge/f98cc82eb-feat-blue" alt="feat - f98cc82eb" /></a></td>
<td>rely on strict template default in generated workspaces</td>
</tr>
<tr>
<td><a href="c9f4081533"><img src="https://img.shields.io/badge/c9f408153-feat-blue" alt="feat - c9f408153" /></a></td>
<td>set up fake timers in beforeEach instead of beforeAll</td>
</tr>
<tr>
<td><a href="de630c2fce"><img src="https://img.shields.io/badge/de630c2fc-feat-blue" alt="feat - de630c2fc" /></a></td>
<td>stabilize refactor-jasmine-vitest schematic</td>
</tr>
<tr>
<td><a href="8d0805dd17"><img src="https://img.shields.io/badge/8d0805dd1-feat-blue" alt="feat - 8d0805dd1" /></a></td>
<td>update TSConfig globals during karma to vitest migration</td>
</tr>
<tr>
<td><a href="470e1f9374"><img src="https://img.shields.io/badge/470e1f937-fix-green" alt="fix - 470e1f937" /></a></td>
<td>add istanbul-lib-instrument to application/library generator dependencies</td>
</tr>
<tr>
<td><a href="dc1238e5a4"><img src="https://img.shields.io/badge/dc1238e5a-fix-green" alt="fix - dc1238e5a" /></a></td>
<td>add trusted-proxy-headers migration</td>
</tr>
<tr>
<td><a href="6572a69443"><img src="https://img.shields.io/badge/6572a6944-fix-green" alt="fix - 6572a6944" /></a></td>
<td>default components to OnPush change detection</td>
</tr>
<tr>
<td><a href="aed407db8b"><img src="https://img.shields.io/badge/aed407db8-fix-green" alt="fix - aed407db8" /></a></td>
<td>defer karma config deletion in Karma to Vitest migration</td>
</tr>
<tr>
<td><a href="4fbc608917"><img src="https://img.shields.io/badge/4fbc60891-fix-green" alt="fix - 4fbc60891" /></a></td>
<td>preserve Jasmine stub-by-default semantics for bare spies</td>
</tr>
<tr>
<td><a href="b3d838dfdb"><img src="https://img.shields.io/badge/b3d838dfd-fix-green" alt="fix - b3d838dfd" /></a></td>
<td>replace deprecated <code>ChangeDetectionStrategy.Default</code> with <code>Eager</code></td>
</tr>
<tr>
<td><a href="a7ac8e5f0a"><img src="https://img.shields.io/badge/a7ac8e5f0-fix-green" alt="fix - a7ac8e5f0" /></a></td>
<td>support spy call arguments migration in refactor-jasmine-vitest</td>
</tr>
<tr>
<td><a href="7fb59eaa65"><img src="https://img.shields.io/badge/7fb59eaa6-fix-green" alt="fix - 7fb59eaa6" /></a></td>
<td>use service decorator in ng generate</td>
</tr>
</tbody>
</table>
<h3><code>@​angular/cli</code></h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="58c0978f65"><img src="https://img.shields.io/badge/58c0978f6-feat-blue" alt="feat - 58c0978f6" /></a></td>
<td>add support for Node.js 26.0.0</td>
</tr>
<tr>
<td><a href="a5c7c0b5fd"><img src="https://img.shields.io/badge/a5c7c0b5f-fix-green" alt="fix - a5c7c0b5f" /></a></td>
<td>reflect new minimum supported Node version in ng.js</td>
</tr>
</tbody>
</table>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/angular/angular-cli/blob/main/CHANGELOG.md">@​angular-devkit/build-angular's changelog</a>.</em></p>
<blockquote>
<h1>22.0.1 (2026-06-10)</h1>
<h3><code>@​angular/cli</code></h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="b54e9a549d">b54e9a549</a></td>
<td>fix</td>
<td>do not sort migrations of the same version alphabetically</td>
</tr>
<tr>
<td><a href="d333116123">d33311612</a></td>
<td>fix</td>
<td>fallback to local package.json for schematic detection on first run</td>
</tr>
<tr>
<td><a href="918102a937">918102a93</a></td>
<td>fix</td>
<td>isolate temporary package installation from parent pnpm workspace</td>
</tr>
<tr>
<td><a href="b048b5f4a8">b048b5f4a</a></td>
<td>fix</td>
<td>remove forceAuth and unscoped credential parsing</td>
</tr>
<tr>
<td><a href="2779340351">277934035</a></td>
<td>fix</td>
<td>validate registry option is a valid URL in ng add</td>
</tr>
<tr>
<td><a href="4510dae021">4510dae02</a></td>
<td>perf</td>
<td>optimize update schematic registry query counts by fetching package metadata lazily</td>
</tr>
</tbody>
</table>
<h3><code>@​schematics/angular</code></h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="c800122945">c80012294</a></td>
<td>fix</td>
<td>fix browserMode option mapping in refactor-jasmine-vitest</td>
</tr>
<tr>
<td><a href="a9b6bd9042">a9b6bd904</a></td>
<td>fix</td>
<td>safely comment out multiline statements in refactor-jasmine-vitest</td>
</tr>
<tr>
<td><a href="12199df00f">12199df00</a></td>
<td>fix</td>
<td>use null objects and callbacks in karma-to-vitest migration</td>
</tr>
</tbody>
</table>
<h3><code>@​angular/build</code></h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="89d1be979f">89d1be979</a></td>
<td>fix</td>
<td>allow disabling Vitest isolation from builder</td>
</tr>
<tr>
<td><a href="d45b84be9a">d45b84be9</a></td>
<td>fix</td>
<td>exclude JSON imports from Vite dependency optimization</td>
</tr>
<tr>
<td><a href="e3cab4ddda">e3cab4ddd</a></td>
<td>fix</td>
<td>prevent concurrent stylesheet bundling esbuild context leaks</td>
</tr>
<tr>
<td><a href="bd413b0eb1">bd413b0eb</a></td>
<td>fix</td>
<td>restrict application builder output paths to output directory</td>
</tr>
</tbody>
</table>
<h1>22.0.0 (2026-06-03)</h1>
<h2>Breaking Changes</h2>
<h3></h3>
<ul>
<li>Node.js v20 is no longer supported. The minimum supported Node.js versions are now v22.22.0 and v24.13.1.</li>
<li>The <code>@angular-devkit/architect-cli</code> package is no longer available. The <code>architect</code> CLI tool has been moved to the <code>@angular-devkit/architect</code> package.</li>
<li>The experimental <code>@angular-devkit/build-angular:jest</code> and <code>@angular-devkit/build-angular:web-test-runner</code> builders have been removed.</li>
</ul>
<h3><code>@​angular/build</code></h3>
<ul>
<li>The <code>@angular/build:dev-server (ng serve)</code> now assigns the highest priority to the <code>PORT</code> environment variable. This value will override any port configurations specified in <code>angular.json</code> or via the <code>--port</code> command-line flag. This includes the default port 4200.</li>
<li><code>istanbul-lib-instrument</code> is now an optional peer dependency.
Projects using karma with code coverage enabled will need to ensure that istanbul-lib-instrument is installed. Note: <code>ng update</code> will automatically add this dependency during the update process.</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="5a64af9918"><code>5a64af9</code></a> release: cut the v22.0.1 release</li>
<li><a href="b54e9a549d"><code>b54e9a5</code></a> fix(<code>@​angular/cli</code>): do not sort migrations of the same version alphabetically</li>
<li><a href="b048b5f4a8"><code>b048b5f</code></a> fix(<code>@​angular/cli</code>): remove forceAuth and unscoped credential parsing</li>
<li><a href="3275b45559"><code>3275b45</code></a> test(<code>@​angular/cli</code>): remove unscoped authentication test cases from registry t...</li>
<li><a href="da81e55123"><code>da81e55</code></a> build: update cross-repo angular dependencies</li>
<li><a href="56ac3484f1"><code>56ac348</code></a> build: lock file maintenance</li>
<li><a href="12199df00f"><code>12199df</code></a> fix(<code>@​schematics/angular</code>): use null objects and callbacks in karma-to-vitest m...</li>
<li><a href="918102a937"><code>918102a</code></a> fix(<code>@​angular/cli</code>): isolate temporary package installation from parent pnpm wo...</li>
<li><a href="e9b106e662"><code>e9b106e</code></a> build: update cross-repo angular dependencies</li>
<li><a href="e3cab4ddda"><code>e3cab4d</code></a> fix(<code>@​angular/build</code>): prevent concurrent stylesheet bundling esbuild context l...</li>
<li>Additional commits viewable in <a href="https://github.com/angular/angular-cli/compare/v21.2.14...v22.0.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@angular-devkit/build-angular&package-manager=npm_and_yarn&previous-version=21.2.14&new-version=22.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2026-06-11 06:44:45 +00:00
2026-02-09 15:37:25 -08:00
2025-11-12 11:46:47 -08:00
2025-11-12 11:46:47 -08:00
2026-04-14 16:49:05 -07:00
2022-05-10 15:08:43 +02:00
2018-06-08 14:36:44 -07:00
2026-04-23 09:42:27 -07:00
2026-04-23 09:42:27 -07:00

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

  • 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

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:

  • 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:

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

Description
No description provided
Readme 1 GiB
Languages
Dart 71%
C++ 11.4%
CMake 8.7%
Kotlin 2.2%
Swift 1.9%
Other 4.8%