Skip to content

Commit 0153553

Browse files
authored
[sync] 2024/12/24 (#1537)
2 parents adcc289 + 440c857 commit 0153553

File tree

608 files changed

+10767
-5616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

608 files changed

+10767
-5616
lines changed

.github/workflows/build.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3535
with:
3636
submodules: recursive
37-
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
37+
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
3838
with:
3939
channel: ${{ matrix.branch }}
4040
- name: Fetch Dart dependencies
@@ -58,7 +58,7 @@ jobs:
5858
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
5959
with:
6060
submodules: recursive
61-
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
61+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
6262
with:
6363
sdk: stable
6464
- name: Fetch Dart dependencies
@@ -86,7 +86,7 @@ jobs:
8686
run: corepack install
8787
- name: Install node dependencies
8888
run: pnpm install --frozen-lockfile
89-
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
89+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
9090
with:
9191
sdk: stable
9292
- name: Fetch Dart dependencies
@@ -109,7 +109,7 @@ jobs:
109109
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
110110
with:
111111
submodules: recursive
112-
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
112+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
113113
with:
114114
sdk: stable
115115
- name: Fetch Dart dependencies
@@ -141,7 +141,7 @@ jobs:
141141
run: corepack install
142142
- name: Install node dependencies
143143
run: pnpm install --frozen-lockfile
144-
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
144+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
145145
with:
146146
sdk: stable
147147
- name: Fetch Dart dependencies

.github/workflows/stage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: corepack install
3636
- name: Install node dependencies
3737
run: pnpm install --frozen-lockfile
38-
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
38+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
3939
with:
4040
sdk: stable
4141
- name: Fetch Dart dependencies

.idx/dev.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# see: https://developers.google.com/idx/guides/customize-idx-env
33
{ pkgs, ... }: {
44
# Which nixpkgs channel to use.
5-
channel = "stable-24.05"; # or "unstable"
5+
channel = "stable-24.11"; # or "unstable"
66

77
# Use https://search.nixos.org/packages to find packages
88
packages = [

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ it's easiest to make changes using the GitHub UI.
4242
If you have an issue with the
4343
API docs on [api.flutter.dev](https://api.flutter.dev),
4444
please file those issues on
45-
the [flutter/flutter](https://github.com/flutter/flutter/issues) repo,
46-
not on this (flutter/website) repo.
45+
the [`flutter/flutter`](https://github.com/flutter/flutter/issues) repo,
46+
not on this (`flutter/website`) repo.
4747
The API docs are embedded in Flutter's source code,
4848
so the engineering team handles those.
4949

@@ -129,7 +129,7 @@ If you prefer, you can use a version manager such as [nvm][],
129129
and run `nvm install` from the repository's root directory.
130130

131131
If you already have Node installed, verify it's available on your path
132-
and already the latest stable version _(currently `20.17` or later)_:
132+
and already the latest stable version _(currently `22.12` or later)_:
133133

134134
```console
135135
node --version
@@ -200,7 +200,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
200200
dart pub get
201201
```
202202

203-
3. (optional - We highly recommend you use `pnpm`, but you can also use `npm`.)
203+
3. _Optional:_ We recommend you use `pnpm`, but you can also use `npm`.
204204
Install `pnpm`, an alternative, efficient package manager for
205205
npm packages. If you already have `pnpm`, verify you have the
206206
latest stable version.
@@ -209,7 +209,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
209209
node --version
210210
```
211211

212-
If you do not already have `pnpm` installed, we recommend
212+
If you don't already have `pnpm` installed, we recommend
213213
using [`corepack`][] to install and manage `pnpm` versions,
214214
since `corepack` is bundled with most installations of
215215
Node. If you installed `node` using Homebrew, you'll need
@@ -327,7 +327,7 @@ run `./dash_site refresh-excerpts`.
327327
To learn more about creating, editing, and using code excerpts,
328328
check out the [excerpt updater package documentation][].
329329

330-
[excerpt updater package documentation]: https://github.com/dart-lang/site-shared/tree/main/packages/excerpter#readme
330+
[excerpt updater package documentation]: https://github.com/dart-lang/site-shared/tree/main/pkgs/excerpter#readme
331331

332332
## [Optional] Deploy to a staging site
333333

@@ -360,7 +360,7 @@ you can build a full version and upload it to Firebase.
360360
./dash_site build
361361
```
362362

363-
This will build the site and copy it to your local `_site` directory.
363+
This builds the site and copies it to your local `_site` directory.
364364
If that directory previously existed, it will be replaced.
365365

366366
3. Deploy to your activated Firebase project's default hosting site:

analysis_options.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
analyzer:
2-
exclude: [flutter, site-shared, src, tmp]
2+
exclude: [_site, flutter, site-shared, src, tmp]

dash_site

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
REQUIRED_DART_VERSION="3.5"
4-
REQUIRED_NODE_VERSION="20.12"
5-
REQUIRED_PNPM_VERSION="9.0"
3+
REQUIRED_DART_VERSION="3.6"
4+
REQUIRED_NODE_VERSION="22.11"
5+
REQUIRED_PNPM_VERSION="9.12"
66

77
# Check that the 'dart' command is available on the user's path.
88
if ! command -v dart &> /dev/null; then
Binary file not shown.

eleventy.config.js eleventy.config.ts

+9-12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { registerFilters } from './src/_11ty/filters.js';
66
import { registerShortcodes } from './src/_11ty/shortcodes.js';
77
import { markdown } from './src/_11ty/plugins/markdown.js';
88
import { configureHighlighting } from './src/_11ty/plugins/highlight.js';
9+
import { UserConfig } from '@11ty/eleventy';
910

1011
import minifier from 'html-minifier-terser';
1112
import yaml from 'js-yaml';
@@ -15,13 +16,9 @@ import * as path from 'node:path';
1516
import * as sass from 'sass';
1617

1718
// noinspection JSUnusedGlobalSymbols
18-
/**
19-
* @typedef {import('11ty/eleventy/UserConfig')} EleventyConfig
20-
* @param {EleventyConfig} eleventyConfig
21-
*/
22-
export default function (eleventyConfig) {
23-
const isProduction = process.env.PRODUCTION === 'true';
24-
const shouldOptimize = process.env.OPTIMIZE === 'true';
19+
export default function (eleventyConfig: UserConfig) {
20+
const isProduction = process.env['PRODUCTION'] === 'true';
21+
const shouldOptimize = process.env['OPTIMIZE'] === 'true';
2522

2623
eleventyConfig.on('eleventy.before', async () => {
2724
await configureHighlighting(markdown);
@@ -31,8 +28,8 @@ export default function (eleventyConfig) {
3128

3229
eleventyConfig.setLibrary('md', markdown);
3330

34-
eleventyConfig.addDataExtension('yml,yaml', (contents) =>
35-
yaml.load(contents),
31+
eleventyConfig.addDataExtension('yml,yaml', (contents: string) =>
32+
yaml.load(contents),
3633
);
3734

3835
eleventyConfig.setLiquidOptions({
@@ -51,7 +48,7 @@ export default function (eleventyConfig) {
5148
eleventyConfig.addWatchTarget('src/_sass');
5249
eleventyConfig.addExtension('scss', {
5350
outputFileExtension: 'css',
54-
compile: function (inputContent, inputPath) {
51+
compile: function (inputContent: string, inputPath: string) {
5552
const parsedPath = path.parse(inputPath);
5653
if (parsedPath.name.startsWith('_')) {
5754
return;
@@ -88,13 +85,13 @@ export default function (eleventyConfig) {
8885
filter: /^(?!_).+/,
8986
});
9087
eleventyConfig.addPassthroughCopy('src/content/tools/devtools/release-notes', {
91-
filter: (path) => path.includes('src') || path.includes('images'),
88+
filter: (path: string) => path.includes('src') || path.includes('images'),
9289
});
9390

9491
if (shouldOptimize) {
9592
// If building for production, minify/optimize the HTML output.
9693
// Doing so during serving isn't worth the extra build time.
97-
eleventyConfig.addTransform('minify-html', async function (content) {
94+
eleventyConfig.addTransform('minify-html', async function (content: string) {
9895
if (this.page.outputPath && this.page.outputPath.endsWith('.html')) {
9996
// Minify the page's content if it's an HTML file.
10097
// Other options can be enabled, but each should be tested.

examples/_animation/basic_hero_animation/analysis_options.yaml

-5
This file was deleted.

examples/_animation/basic_hero_animation/pubspec.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@ publish_to: none
33
description: >-
44
Shows how to create a simple or Hero animation using the Hero class directly.
55
6+
resolution: workspace
67
environment:
7-
sdk: ^3.5.0
8+
sdk: ^3.6.0
89

910
dependencies:
1011
flutter:
1112
sdk: flutter
1213

1314
dev_dependencies:
14-
example_utils:
15-
path: ../../example_utils
1615
flutter_test:
1716
sdk: flutter
1817

examples/_animation/basic_radial_hero_animation/analysis_options.yaml

-5
This file was deleted.

examples/_animation/basic_radial_hero_animation/lib/main.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Photo extends StatelessWidget {
2222
return Material(
2323
// Slightly opaque color appears where the image has transparency.
2424
// Makes it possible to see the radial transformation's boundary.
25-
color: Theme.of(context).primaryColor.withOpacity(0.25),
25+
color: Theme.of(context).primaryColor.withValues(alpha: 0.25),
2626
child: InkWell(
2727
onTap: onTap,
2828
child: Image.asset(

examples/_animation/basic_radial_hero_animation/pubspec.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ description: >-
44
Shows how to apply a radial transformation to the Hero
55
as it animates to the new route.
66
7+
resolution: workspace
78
environment:
8-
sdk: ^3.5.0
9+
sdk: ^3.6.0
910

1011
dependencies:
1112
flutter:
1213
sdk: flutter
1314

1415
dev_dependencies:
15-
example_utils:
16-
path: ../../example_utils
1716
flutter_test:
1817
sdk: flutter
1918

examples/_animation/basic_staggered_animation/analysis_options.yaml

-5
This file was deleted.

examples/_animation/basic_staggered_animation/lib/main.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ class _StaggerDemoState extends State<StaggerDemo>
187187
width: 300,
188188
height: 300,
189189
decoration: BoxDecoration(
190-
color: Colors.black.withOpacity(0.1),
190+
color: Colors.black.withValues(alpha: 0.1),
191191
border: Border.all(
192-
color: Colors.black.withOpacity(0.5),
192+
color: Colors.black.withValues(alpha: 0.5),
193193
),
194194
),
195195
child: StaggerAnimation(controller: _controller.view),

examples/_animation/basic_staggered_animation/pubspec.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ name: basic_staggered
22
publish_to: none
33
description: An introductory example to staggered animations.
44

5+
resolution: workspace
56
environment:
6-
sdk: ^3.5.0
7+
sdk: ^3.6.0
78

89
dependencies:
910
flutter:
1011
sdk: flutter
1112

1213
dev_dependencies:
13-
example_utils:
14-
path: ../../example_utils
1514
flutter_test:
1615
sdk: flutter
1716

examples/_animation/hero_animation/analysis_options.yaml

-5
This file was deleted.

examples/_animation/hero_animation/pubspec.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ name: hero_animation
22
publish_to: none
33
description: Shows how to create a simple Hero transition.
44

5+
resolution: workspace
56
environment:
6-
sdk: ^3.5.0
7+
sdk: ^3.6.0
78

89
dependencies:
910
flutter:
1011
sdk: flutter
1112

1213
dev_dependencies:
13-
example_utils:
14-
path: ../../example_utils
1514
flutter_test:
1615
sdk: flutter
1716

examples/_animation/radial_hero_animation/analysis_options.yaml

-5
This file was deleted.

examples/_animation/radial_hero_animation/lib/main.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Photo extends StatelessWidget {
2525
Widget build(BuildContext context) {
2626
return Material(
2727
// Slightly opaque color appears where the image has transparency.
28-
color: Theme.of(context).primaryColor.withOpacity(0.25),
28+
color: Theme.of(context).primaryColor.withValues(alpha: 0.25),
2929
child: InkWell(
3030
onTap: onTap,
3131
child: LayoutBuilder(

examples/_animation/radial_hero_animation/pubspec.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ description: >-
44
Shows how to apply a radial transformation to the Hero
55
as it animates to the new route.
66
7+
resolution: workspace
78
environment:
8-
sdk: ^3.5.0
9+
sdk: ^3.6.0
910

1011
dependencies:
1112
flutter:
1213
sdk: flutter
1314

1415
dev_dependencies:
15-
example_utils:
16-
path: ../../example_utils
1716
flutter_test:
1817
sdk: flutter
1918

examples/_animation/radial_hero_animation_animate_rectclip/analysis_options.yaml

-5
This file was deleted.

examples/_animation/radial_hero_animation_animate_rectclip/lib/main.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Photo extends StatelessWidget {
2626
Widget build(BuildContext context) {
2727
return Material(
2828
// Slightly opaque color appears where the image has transparency.
29-
color: Theme.of(context).primaryColor.withOpacity(0.25),
29+
color: Theme.of(context).primaryColor.withValues(alpha: 0.25),
3030
child: InkWell(
3131
onTap: onTap,
3232
child: LayoutBuilder(

examples/_animation/radial_hero_animation_animate_rectclip/pubspec.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ description: >-
44
Shows how to apply a radial transformation to the Hero
55
as it animates to the new route.
66
7+
resolution: workspace
78
environment:
8-
sdk: ^3.5.0
9+
sdk: ^3.6.0
910

1011
dependencies:
1112
flutter:
1213
sdk: flutter
1314

1415
dev_dependencies:
15-
example_utils:
16-
path: ../../example_utils
1716
flutter_test:
1817
sdk: flutter
1918

examples/_animation/staggered_pic_selection/analysis_options.yaml

-5
This file was deleted.

0 commit comments

Comments
 (0)