1
0
mirror of https://github.com/flutter/samples.git synced 2026-03-21 20:08:16 +00:00
dependabot[bot] f1427f0938 Bump @angular/platform-browser from 20.3.17 to 21.2.0 in /web_embedding/ng-flutter (#2814)
Bumps [@angular/platform-browser](https://github.com/angular/angular/tree/HEAD/packages/platform-browser) from 20.3.17 to 21.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/angular/angular/releases"><code>@​angular/platform-browser</code>'s releases</a>.</em></p>
<blockquote>
<h2>VSCode Extension: 21.2.0</h2>
<ul>
<li>fix(vscode-extension): Highlight function calls with optional chaining (<a href="4f8d3995f0">4f8d3995f0</a>)</li>
<li>feat(language-service): add linked editing ranges for HTML tag synchronization (<a href="8c21866f49">8c21866f49</a>)</li>
<li>fix(vscode-extension): support highlighting for class bindings with brackets (<a href="01ed57f297">01ed57f297</a>)</li>
<li>feat(language-service): add JSON schema for angularCompilerOptions (<a href="496967e7b1">496967e7b1</a>)</li>
<li>fix(language-service): Detect local project version on creation (<a href="8a7cbd4668">8a7cbd4668</a>)</li>
<li>feat(language-server): Support client-side file watching via <code>onDidChangeWatchedFiles</code> (<a href="6fb39d9b62">6fb39d9b62</a>)</li>
<li>feat(language-server): Add completions and hover info for inline styles (<a href="ebc90c26f5">ebc90c26f5</a>)</li>
<li>feat(language-server): Add quick info for inline styles (<a href="573aadef7e">573aadef7e</a>)</li>
<li>feat(language-server): Add folding range support for inline styles (<a href="26fd0839c3">26fd0839c3</a>)</li>
</ul>
<h2>21.2.0</h2>
<h3>common</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="18003a33bb"><img src="https://img.shields.io/badge/18003a33bb-feat-blue" alt="feat - 18003a33bb" /></a></td>
<td>add an 'outlet' injector option for ngTemplateOutlet</td>
</tr>
<tr>
<td><a href="8bbe6dc46c"><img src="https://img.shields.io/badge/8bbe6dc46c-feat-blue" alt="feat - 8bbe6dc46c" /></a></td>
<td>Add Location strategies to manage trailing slash on write</td>
</tr>
<tr>
<td><a href="51cc914807"><img src="https://img.shields.io/badge/51cc914807-feat-blue" alt="feat - 51cc914807" /></a></td>
<td>support height in ImageLoaderConfig and built-in loaders</td>
</tr>
</tbody>
</table>
<h3>compiler</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="72534e2a34"><img src="https://img.shields.io/badge/72534e2a34-feat-blue" alt="feat - 72534e2a34" /></a></td>
<td>Add support for the <code>instanceof</code> binary operator</td>
</tr>
<tr>
<td><a href="95b3f37d4a"><img src="https://img.shields.io/badge/95b3f37d4a-feat-blue" alt="feat - 95b3f37d4a" /></a></td>
<td>Exhaustive checks for switch blocks</td>
</tr>
<tr>
<td><a href="04ba09a8d9"><img src="https://img.shields.io/badge/04ba09a8d9-feat-blue" alt="feat - 04ba09a8d9" /></a></td>
<td>support <code>AstVisitor.visitEmptyExpr()</code></td>
</tr>
<tr>
<td><a href="ce80136e7b"><img src="https://img.shields.io/badge/ce80136e7b-fix-green" alt="fix - ce80136e7b" /></a></td>
<td>optimize away unnecessary restore/reset view calls</td>
</tr>
<tr>
<td><a href="3242a61bae"><img src="https://img.shields.io/badge/3242a61bae-fix-green" alt="fix - 3242a61bae" /></a></td>
<td>variable counter visiting some expressions twice</td>
</tr>
</tbody>
</table>
<h3>compiler-cli</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="473dd3e1cb"><img src="https://img.shields.io/badge/473dd3e1cb-fix-green" alt="fix - 473dd3e1cb" /></a></td>
<td>attach source spans to object literal keys in TCB</td>
</tr>
<tr>
<td><a href="a904d9f77b"><img src="https://img.shields.io/badge/a904d9f77b-fix-green" alt="fix - a904d9f77b" /></a></td>
<td>support nested component declaration</td>
</tr>
<tr>
<td><a href="2ea6dfc6c9"><img src="https://img.shields.io/badge/2ea6dfc6c9-fix-green" alt="fix - 2ea6dfc6c9" /></a></td>
<td>update diagnostic to flag no-op arrow functions in listeners</td>
</tr>
</tbody>
</table>
<h3>core</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="8d5210c9fe"><img src="https://img.shields.io/badge/8d5210c9fe-feat-blue" alt="feat - 8d5210c9fe" /></a></td>
<td>add ChangeDetectionStrategy.Eager alias for Default</td>
</tr>
<tr>
<td><a href="92d2498910"><img src="https://img.shields.io/badge/92d2498910-feat-blue" alt="feat - 92d2498910" /></a></td>
<td>add host node to DeferBlockData (<a href="https://github.com/angular/angular/tree/HEAD/packages/platform-browser/issues/66546">#66546</a>)</td>
</tr>
<tr>
<td><a href="ea2016a6dc"><img src="https://img.shields.io/badge/ea2016a6dc-feat-blue" alt="feat - ea2016a6dc" /></a></td>
<td>add support for nested animations</td>
</tr>
<tr>
<td><a href="81cabc1477"><img src="https://img.shields.io/badge/81cabc1477-feat-blue" alt="feat - 81cabc1477" /></a></td>
<td>add support for TypeScript 6</td>
</tr>
<tr>
<td><a href="1ba9b7ac50"><img src="https://img.shields.io/badge/1ba9b7ac50-feat-blue" alt="feat - 1ba9b7ac50" /></a></td>
<td>resource composition via snapshots</td>
</tr>
<tr>
<td><a href="d9923b72a2"><img src="https://img.shields.io/badge/d9923b72a2-feat-blue" alt="feat - d9923b72a2" /></a></td>
<td>support arrow functions in expressions</td>
</tr>
<tr>
<td><a href="a7e8abbb7e"><img src="https://img.shields.io/badge/a7e8abbb7e-fix-green" alt="fix - a7e8abbb7e" /></a></td>
<td>correctly handle SkipSelf when resolving from embedded view injector</td>
</tr>
<tr>
<td><a href="0806ee3826"><img src="https://img.shields.io/badge/0806ee3826-fix-green" alt="fix - 0806ee3826" /></a></td>
<td>prevent animated element duplication with dynamic components in zoneless mode</td>
</tr>
<tr>
<td><a href="ed78fa05c7"><img src="https://img.shields.io/badge/ed78fa05c7-fix-green" alt="fix - ed78fa05c7" /></a></td>
<td>Remove note to skip arrow functions in best practices</td>
</tr>
</tbody>
</table>
<h3>forms</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="f56bb07d83"><img src="https://img.shields.io/badge/f56bb07d83-feat-blue" alt="feat - f56bb07d83" /></a></td>
<td>add field param to submit action and onInvalid</td>
</tr>
<tr>
<td><a href="ba009b6031"><img src="https://img.shields.io/badge/ba009b6031-feat-blue" alt="feat - ba009b6031" /></a></td>
<td>add form directive</td>
</tr>
<tr>
<td><a href="22afbb2f36"><img src="https://img.shields.io/badge/22afbb2f36-feat-blue" alt="feat - 22afbb2f36" /></a></td>
<td>add parsing support to native inputs (<a href="https://github.com/angular/angular/tree/HEAD/packages/platform-browser/issues/66917">#66917</a>)</td>
</tr>
</tbody>
</table>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/angular/angular/blob/main/CHANGELOG.md"><code>@​angular/platform-browser</code>'s changelog</a>.</em></p>
<blockquote>
<h1>20.3.17 (2026-02-25)</h1>
<h2>Breaking Changes</h2>
<h3>core</h3>
<ul>
<li>
<p>Angular now only applies known attributes from HTML in translated ICU content. Unknown attributes are dropped and not rendered.</p>
<p>(cherry picked from commit 03da204b6daa5e4583e0d0968c2107390bbd8235)</p>
</li>
</ul>
<h3>core</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="7f9de3c118">7f9de3c118</a></td>
<td>fix</td>
<td>block creation of sensitive URI attributes from ICU messages</td>
</tr>
</tbody>
</table>
<h1>21.2.0 (2026-02-25)</h1>
<h3>common</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="18003a33bb">18003a33bb</a></td>
<td>feat</td>
<td>add an 'outlet' injector option for ngTemplateOutlet</td>
</tr>
<tr>
<td><a href="8bbe6dc46c">8bbe6dc46c</a></td>
<td>feat</td>
<td>Add Location strategies to manage trailing slash on write</td>
</tr>
<tr>
<td><a href="51cc914807">51cc914807</a></td>
<td>feat</td>
<td>support height in ImageLoaderConfig and built-in loaders</td>
</tr>
</tbody>
</table>
<h3>compiler</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="72534e2a34">72534e2a34</a></td>
<td>feat</td>
<td>Add support for the <code>instanceof</code> binary operator</td>
</tr>
<tr>
<td><a href="95b3f37d4a">95b3f37d4a</a></td>
<td>feat</td>
<td>Exhaustive checks for switch blocks</td>
</tr>
<tr>
<td><a href="04ba09a8d9">04ba09a8d9</a></td>
<td>feat</td>
<td>support <code>AstVisitor.visitEmptyExpr()</code></td>
</tr>
<tr>
<td><a href="ce80136e7b">ce80136e7b</a></td>
<td>fix</td>
<td>optimize away unnecessary restore/reset view calls</td>
</tr>
<tr>
<td><a href="3242a61bae">3242a61bae</a></td>
<td>fix</td>
<td>variable counter visiting some expressions twice</td>
</tr>
</tbody>
</table>
<h3>compiler-cli</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="473dd3e1cb">473dd3e1cb</a></td>
<td>fix</td>
<td>attach source spans to object literal keys in TCB</td>
</tr>
<tr>
<td><a href="a904d9f77b">a904d9f77b</a></td>
<td>fix</td>
<td>support nested component declaration</td>
</tr>
<tr>
<td><a href="2ea6dfc6c9">2ea6dfc6c9</a></td>
<td>fix</td>
<td>update diagnostic to flag no-op arrow functions in listeners</td>
</tr>
</tbody>
</table>
<h3>core</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="8d5210c9fe">8d5210c9fe</a></td>
<td>feat</td>
<td>add ChangeDetectionStrategy.Eager alias for Default</td>
</tr>
<tr>
<td><a href="92d2498910">92d2498910</a></td>
<td>feat</td>
<td>add host node to DeferBlockData (<a href="https://redirect.github.com/angular/angular/pull/66546">#66546</a>)</td>
</tr>
<tr>
<td><a href="ea2016a6dc">ea2016a6dc</a></td>
<td>feat</td>
<td>add support for nested animations</td>
</tr>
<tr>
<td><a href="81cabc1477">81cabc1477</a></td>
<td>feat</td>
<td>add support for TypeScript 6</td>
</tr>
<tr>
<td><a href="1ba9b7ac50">1ba9b7ac50</a></td>
<td>feat</td>
<td>resource composition via snapshots</td>
</tr>
<tr>
<td><a href="d9923b72a2">d9923b72a2</a></td>
<td>feat</td>
<td>support arrow functions in expressions</td>
</tr>
<tr>
<td><a href="a7e8abbb7e">a7e8abbb7e</a></td>
<td>fix</td>
<td>correctly handle SkipSelf when resolving from embedded view injector</td>
</tr>
<tr>
<td><a href="0806ee3826">0806ee3826</a></td>
<td>fix</td>
<td>prevent animated element duplication with dynamic components in zoneless mode</td>
</tr>
<tr>
<td><a href="ed78fa05c7">ed78fa05c7</a></td>
<td>fix</td>
<td>Remove note to skip arrow functions in best practices</td>
</tr>
</tbody>
</table>
<h3>forms</h3>
<table>
<thead>
<tr>
<th>Commit</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
</table>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="11767cabe4"><code>11767ca</code></a> build: update Jasmine to 6.0.0</li>
<li><a href="85122cb12d"><code>85122cb</code></a> docs: update <code>bootstrapApplication</code> docs</li>
<li><a href="f4469ad583"><code>f4469ad</code></a> refactor(core): update error message links to versioned docs (<a href="https://github.com/angular/angular/tree/HEAD/packages/platform-browser/issues/66374">#66374</a>)</li>
<li><a href="99ad18a4ee"><code>99ad18a</code></a> feat(core): Add stability debugging utility</li>
<li><a href="6270bba056"><code>6270bba</code></a> ci: reformat files</li>
<li><a href="2ccdf50fba"><code>2ccdf50</code></a> refactor(platform-browser): remove unused <code>platformIsServer</code>  flag from renderer</li>
<li><a href="b4f584cf42"><code>b4f584c</code></a> fix(core): return <code>StaticProvider</code> for <code>providePlatformInitializer</code></li>
<li><a href="96b79fc393"><code>96b79fc</code></a> refactor(core): correct all <code>typeof ngDevMode</code> comparison patterns introduced...</li>
<li><a href="c137f1fe91"><code>c137f1f</code></a> docs: ExperimentalIsolatedShadowDom mentions</li>
<li><a href="21ca49cf62"><code>21ca49c</code></a> refactor(core): rename <code>ExperimentalIsolatedShadowDom</code> to <code>IsolatedShadowDom</code></li>
<li>Additional commits viewable in <a href="https://github.com/angular/angular/commits/v21.2.0/packages/platform-browser">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@angular/platform-browser&package-manager=npm_and_yarn&previous-version=20.3.17&new-version=21.2.0)](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-03-02 06:49:52 +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
2025-11-12 11:46:47 -08:00
2025-11-12 11:46:47 -08:00
2025-11-12 11:46:47 -08:00
2025-11-12 11:46:47 -08:00
2026-02-09 13:26:00 -08:00
2022-05-10 15:08:43 +02:00
2018-06-08 14:36:44 -07:00
2026-02-09 13:26:00 -08: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.
  • code_sharing - Demonstrates how to share business logic between Flutter client and Dart server using package: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 using isolates.
  • navigation_and_routing - A sample that shows how to use go_router API to handle common navigation scenarios.
  • place_tracker - A sample place tracking app that uses the google_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 using package:provider to manage state.
  • provider_shopper - A Flutter sample app that shows a state management approach using package:provider.
  • simple_shader - A simple Flutter 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 of TextEditingDeltas 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 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%